Compare commits

...

6 Commits

8 changed files with 166 additions and 49 deletions

View File

@ -155,16 +155,16 @@
]
},
"locked": {
"lastModified": 1716736833,
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=",
"lastModified": 1731832479,
"narHash": "sha256-icDDuYwJ0avTMZTxe1qyU/Baht5JOqw4pb5mWpR+hT0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6",
"rev": "5056a1cf0ce7c2a08ab50713b6c4af77975f6111",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
@ -213,17 +213,15 @@
"nixos-apple-silicon": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1718588737,
"narHash": "sha256-06acqoMEYtc+/w5gWiIIuUFfdtdOBKlp1qrC/InRiBY=",
"lastModified": 1731473366,
"narHash": "sha256-sE2WfD3YyNrCROfRZKqMDR77g3KV4FXUaJ7NWe+A7ro=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "b0a2376f6c164a0af963d47386c064cc6fdcd5ea",
"rev": "3eee753e4b074790342fadb1c4e7183d037ddac4",
"type": "github"
},
"original": {
@ -234,16 +232,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1726062281,
"narHash": "sha256-PyFVySdGj3enKqm8RQuo4v1KLJLmNLOq2yYOHsI6e2Q=",
"lastModified": 1731139594,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e65aa8301ba4f0ab8cb98f944c14aa9da07394f8",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -268,11 +266,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1726436956,
"narHash": "sha256-a3rP7uafX/qBFX0y4CGS8vvTPvxsLl9eZQ85DkIn3DI=",
"lastModified": 1731763621,
"narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "039b72d0c738c934e2e36d7fc5520d1b425287a6",
"rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d",
"type": "github"
},
"original": {
@ -282,6 +280,22 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1731858824,
"narHash": "sha256-0KhJ6SOyWjx408tsgcoVQFx9nEn55DwrhFbCE49Oyac=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7937932921ea34c51c1b586e2505574f6f0be5a7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"agda": "agda",
@ -290,7 +304,7 @@
"kak": "kak",
"nix-darwin": "nix-darwin",
"nixos-apple-silicon": "nixos-apple-silicon",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
"unambig-path": "unambig-path",
"unispect": "unispect"

View File

@ -3,10 +3,11 @@
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
# TODO: We run whole system unstable until 24.11 drops, then the gpu drivers should work
nixpkgs.url = "github:nixos/nixpkgs/release-24.11";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
@ -37,7 +38,8 @@
};
nixos-apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
# TODO: when nixos-24.11 drops, change this
# inputs.nixpkgs.follows = "nixpkgs";
};
};
@ -179,7 +181,7 @@
use-iwd = false;
};
graphical = mkNixOsGraphical {
inherit pkgs;
inherit pkgs pkgs-unstable;
background = "pan-wire-3.png";
use-display-manager = true;
};
@ -219,6 +221,7 @@
nixos-apple-silicon.nixosModules.apple-silicon-support
./nixos/machines/foxhut/hardware.nix
(import ./nixos/machines/foxhut/boot.nix { inherit pkgs pkgs-unstable asahi-firmware; })
(import ./nixos/machines/foxhut/machine.nix { inherit pkgs pkgs-unstable asahi-firmware; })
base
networking
graphical

View File

@ -62,8 +62,8 @@ esac";
foreground = "#ebdbb2";
};
shell.program = "${pkgs.zsh}/bin/zsh";
shell.args = [ "--login" "-c" "${tmux-menu}" ];
terminal.shell.program = "${pkgs.zsh}/bin/zsh";
terminal.shell.args = [ "--login" "-c" "${tmux-menu}" ];
keyboard.bindings = import ./keybinds.nix { bind-broken-mac-keybinds = stdenv.isDarwin; };
};

View File

@ -45,7 +45,7 @@ in rec {
inkscape
]
++ (if pkgs.stdenv.isDarwin then [alloy6-mac] else [pkgs.alloy6])
++ (if pkgs.stdenv.isDarwin then [] else [pkgs.keepassxc pkgs.vesktop pkgs.signal-desktop pkgs.ares])
++ (if pkgs.stdenv.isDarwin then [] else [pkgs.keepassxc pkgs.vesktop pkgs.ares])
;
programs.alacritty = alacritty;

View File

@ -1,12 +1,39 @@
{
pkgs,
pkgs-unstable,
background-image ? "pan-wire-3.png",
use-display-manager,
...
}:
let start-plasma-shortcut = pkgs.writeScriptBin "desktop" ''
${pkgs.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed ${pkgs.plasma-workspace}/bin/startplasma-wayland
'';
'';
# kicad is broken in 2411
# TODO: update to 2411
pkgs_2405 = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/e8c38b73aeb218e27163376a2d617e61a2ad9b59.tar.gz") {};
kicad-patch = pkgs.stdenv.mkDerivation {
name = "kicad-patch";
version = pkgs_2405.kicad-small.version;
src = pkgs_2405.kicad-small;
buildInputs = [ pkgs.makeWrapper ];
buildPhase = ''
mkdir $out
cp -r $src/* $out
chmod -R u+w $out
# don't want the individual kicad things to show up as applications
mv $out/share/applications $out/share/applications.0
mkdir $out/share/applications
cp $out/share/applications.0/org.kicad.kicad.desktop $out/share/applications/
# https://github.com/NixOS/nixpkgs/issues/338062#issuecomment-2430847477
for prog in $out/bin/* ; do
wrapProgram $prog \
--set GDK_BACKEND x11
done
'';
};
in
{
services.xserver = {
@ -35,7 +62,7 @@ in
console.useXkbConfig = true;
sound.enable = false; # let pipewire handle sound
# sound.enable = false; # let pipewire handle sound
services.pipewire = {
enable = true;
alsa.enable = true;
@ -53,15 +80,16 @@ in
uid = 1002;
};
environment.systemPackages = with pkgs; [
environment.systemPackages = (with pkgs; [
stilo-themes
firefox
thunderbird
glxinfo
start-plasma-shortcut
remmina
libreoffice
kicad-small
];
kicad-patch
]) ++ (with pkgs_2405; [
firefox
]);
}

View File

@ -1,8 +1,4 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ pkgs, pkgs-unstable, asahi-firmware, ... }:
{ pkgs, asahi-firmware, ... }:
{ config, ... }:
{
@ -27,11 +23,5 @@
device = "/swap";
size = 16 * 1024; # 16GB
}];
environment.systemPackages = (with pkgs-unstable; [
renoise
]) ++ (with pkgs; [
prismlauncher
]);
}

View File

@ -0,0 +1,63 @@
{ pkgs, pkgs-unstable, asahi-firmware, ... }:
{ config, ... }:
{
environment.systemPackages = (with pkgs-unstable; [
renoise
signal-desktop
wireguard-tools
cifs-utils
]) ++ (with pkgs; [
prismlauncher
]);
services.mysql = {
enable = true;
package = pkgs.mariadb;
dataDir = "/var/lib/mysql";
settings = {
mysqld = {
bind_address = "127.0.0.1";
# socket = "/tmp/mariadb.sock";
};
};
ensureDatabases = [
"bnuybase"
];
ensureUsers = [
{
name = "xenia";
ensurePermissions = {
"bnuybase.*" = "ALL PRIVILEGES";
};
}
];
};
networking.firewall.allowedUDPPorts = [ 51821 ];
networking.wireguard = {
enable = true;
interfaces.wg0 = {
ips = [ "192.168.69.254/32" ];
listenPort = 51821;
privateKeyFile = "/home/xenia/wireguard-keys/private";
peers = [ {
publicKey = "XfHU29ij76y4TB8P/QJyn1JnTl9tvxO77IGVmM6p+ic=";
allowedIPs = [ "10.30.0.0/16" "10.250.0.0/16" "10.254.0.0/16" "192.168.30.0/24" "192.168.40.0/24" "192.168.50.0/24" "192.168.51.0/24" "192.168.250.0/24" ];
endpoint = "129.16.13.37:13231";
persistentKeepalive = 25;
} ];
};
};
services.pipewire.wireplumber.extraConfig."10-bluez" = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = false;
"bluez5.enable-hw-volume" = true;
"bluez5.codecs" = [
"sbc" "sbc_xq" "aac"
];
};
};
}

View File

@ -1,16 +1,35 @@
{
pkgs,
}:
let tiny-dfr = pkgs.tiny-dfr.overrideAttrs (old: {
src = pkgs.fetchFromGitHub {
let tiny-dfr = with pkgs; rustPlatform.buildRustPackage rec {
pname = "tiny-dfr";
version = "0.3.2";
src = fetchFromGitHub {
owner = "xeniagda";
repo = "tiny-dfr";
rev = "master";
hash = "sha256-I2R28wQz4Vd8VonbDcM6TZOn5lnWSXqwX4w/sieaQL8=";
rev = "v${version}";
hash = "sha256-6BzUMh6Mrae6QNwEWNmZVeKGJ8e2uFmx/O10bxt5k8I=";
};
cargoHash = "sha256-IfjXuXDMZ1hOwPWSXgNk5rin/uwFc2iFE+XusjQ3kKE=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ cairo gdk-pixbuf glib libinput libxml2 pango udev ];
postConfigure = ''
substituteInPlace etc/systemd/system/tiny-dfr.service \
--replace-fail /usr/bin $out/bin
substituteInPlace src/*.rs --replace-quiet /usr/share $out/share
'';
postInstall = ''
cp -R etc $out/lib
cp -R share $out
'';
};
});
in
assert tiny-dfr.version == "0.3.1";
{
services.udev.packages = [ tiny-dfr ];
systemd.services.tiny-dfr = {