diff --git a/.helix/languages.toml b/.helix/languages.toml new file mode 100644 index 0000000..1579820 --- /dev/null +++ b/.helix/languages.toml @@ -0,0 +1,6 @@ +[[language]] +name = "nix" +language-servers = [ "nixd" ] + +[language-server.nixd] +command = "nixd" diff --git a/configurations/home-manager/deck/home.nix b/configurations/home-manager/deck/home.nix index 1e6e900..0e4f387 100644 --- a/configurations/home-manager/deck/home.nix +++ b/configurations/home-manager/deck/home.nix @@ -21,9 +21,6 @@ in { configDir = configDir; machine = machine; }; - jiten.enable = false; - joshuto.enable = true; - kakoune.enable = true; ssh = { enable = true; identityPath = "${secretDir}/deck/ssh/id_ed25519"; @@ -54,11 +51,6 @@ in { programs.bash = { enable = true; - profileExtra = '' - # Fix programs not showing up - export XDG_DATA_DIRS="$HOME/.nix-profile/share:$XDG_DATA_DIRS" - ''; - initExtra = "exec zsh"; }; diff --git a/configurations/home-manager/pi/home.nix b/configurations/home-manager/pi/home.nix index 4cf4358..e0692e9 100644 --- a/configurations/home-manager/pi/home.nix +++ b/configurations/home-manager/pi/home.nix @@ -23,13 +23,12 @@ in { }; userDirs = { enable = true; - autoSortDownloads = true; + autoSortDownloads = false; }; yazi = { enable = true; configDir = configDir; }; - kakoune.enable = true; ssh = { enable = true; identityPath = "${secretDir}/${machine}/ssh/id_ed25519"; diff --git a/configurations/nixos/pi/age/airvpn-wg.conf.age b/configurations/nixos/pi/age/airvpn-wg.conf.age index 74a9d80..46e7083 100644 Binary files a/configurations/nixos/pi/age/airvpn-wg.conf.age and b/configurations/nixos/pi/age/airvpn-wg.conf.age differ diff --git a/configurations/nixos/pi/age/wifi.age b/configurations/nixos/pi/age/wifi.age index 8530dca..c5ee100 100644 Binary files a/configurations/nixos/pi/age/wifi.age and b/configurations/nixos/pi/age/wifi.age differ diff --git a/configurations/nixos/pi/configuration.nix b/configurations/nixos/pi/configuration.nix index 5ae77e3..5c98f15 100644 --- a/configurations/nixos/pi/configuration.nix +++ b/configurations/nixos/pi/configuration.nix @@ -39,8 +39,8 @@ in { vpn = { enable = true; - vpnTestService.enable = true; wgConf = config.age.secrets."airvpn-wg.conf".path; + vpnTestService.enable = true; }; ddns.njalla = { @@ -66,11 +66,6 @@ in { package = inputs.nixpkgs-2405.legacyPackages.${pkgs.system}.transmission_4; vpn.enable = true; peerPort = transmissionPort; - flood.enable = true; - extraSettings = { - download-queue-enabled = true; - download-queue-size = 3; - }; }; sonarr.enable = true; @@ -94,13 +89,10 @@ in { # This should force systemd to restart, no matter what. systemd.services.systemd-journald.unitConfig.StartLimitIntervalSec = 0; - # Setup swap ram for stability - swapDevices = [ - { - device = "/var/lib/swapfile"; - size = 6 * 1024; - } - ]; + services.earlyoom = { + enable = true; + freeMemThreshold = 3; # In percent + }; services = { syncthing = { @@ -113,14 +105,7 @@ in { }; }; - networking = { - hostName = machine; - wireless = { - enable = true; - environmentFile = config.age.secrets.wifi.path; - networks."dd-wrt" = {psk = "@HOME@";}; - }; - }; + networking.hostName = machine; users = { mutableUsers = false; @@ -189,6 +174,10 @@ in { "panic_on_oops=1" # Reboot on any kernel oops (optional) ]; + # https://github.com/NixOS/nixos-hardware/issues/858 + boot.initrd.systemd.enableTpm2 = false; + + environment.systemPackages = with pkgs; [ # Compression zip diff --git a/flake.lock b/flake.lock index 31b9a19..7693c1c 100644 --- a/flake.lock +++ b/flake.lock @@ -52,32 +52,11 @@ ] }, "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", "owner": "numtide", "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "devshell_2": { - "inputs": { - "nixpkgs": [ - "nixarr", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", - "owner": "numtide", - "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", "type": "github" }, "original": { @@ -93,11 +72,11 @@ ] }, "locked": { - "lastModified": 1726153070, - "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -107,27 +86,6 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nixarr", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1726153070, - "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nixarr", @@ -136,11 +94,11 @@ ] }, "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -164,21 +122,6 @@ "type": "github" } }, - "flake-root_2": { - "locked": { - "lastModified": 1723604017, - "narHash": "sha256-rBtQ8gg+Dn4Sx/s+pvjdq3CB2wQNzx9XGFq/JVGCB6k=", - "owner": "srid", - "repo": "flake-root", - "rev": "b759a56851e10cb13f6b8e5698af7b59c44be26e", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "flake-root", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -187,11 +130,11 @@ ] }, "locked": { - "lastModified": 1703113217, - "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "lastModified": 1729894599, + "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", "owner": "nix-community", "repo": "home-manager", - "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", "type": "github" }, "original": { @@ -207,11 +150,11 @@ ] }, "locked": { - "lastModified": 1727383923, - "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", + "lastModified": 1729894599, + "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", "owner": "nix-community", "repo": "home-manager", - "rev": "ffe2d07e771580a005e675108212597e5b367d2d", + "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", "type": "github" }, "original": { @@ -222,22 +165,17 @@ }, "nixarr": { "inputs": { - "devshell": "devshell_2", - "flake-parts": "flake-parts_2", - "flake-root": "flake-root_2", "nixpkgs": [ "nixpkgs" ], - "submerger": "submerger", - "treefmt-nix": "treefmt-nix", "vpnconfinement": "vpnconfinement" }, "locked": { - "lastModified": 1726847117, - "narHash": "sha256-fBxizpL5SJIgzh5mIeUWghHr5437jUc+BLu8dOwnDZo=", + "lastModified": 1729934326, + "narHash": "sha256-IAdDVX+PBlnKuvHnLsvLkO4On7qfesVauQ6eGNBsxcI=", "owner": "rasmus-kirk", "repo": "nixarr", - "rev": "a3fad60dd2f5110536eb13f24e7529b2506ade6d", + "rev": "3df58a0b1e8802ba2f356e18dc8bd574df5e1581", "type": "github" }, "original": { @@ -249,11 +187,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1727540359, - "narHash": "sha256-U+225h1kJZpWb23+RaX1sBkqC4fA7aa7eBbgiQ5HcO4=", + "lastModified": 1729742320, + "narHash": "sha256-u3Of8xRkN//me8PU+RucKA59/6RNy4B2jcGAF36P4jI=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "fb08bde00c20252b892a3e57fb094eb62b65ba61", + "rev": "e8a2f6d5513fe7b7d15701b2d05404ffdc3b6dda", "type": "github" }, "original": { @@ -265,11 +203,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1727348695, - "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "lastModified": 1729665710, + "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d", "type": "github" }, "original": { @@ -281,11 +219,11 @@ }, "nixpkgs-2405": { "locked": { - "lastModified": 1727397532, - "narHash": "sha256-pojbL/qteElw/nIXlN8kmHn/w6PQbEHr7Iz+WOXs0EM=", + "lastModified": 1729691686, + "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f65141456289e81ea0d5a05af8898333cab5c53d", + "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", "type": "github" }, "original": { @@ -306,51 +244,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-2405": "nixpkgs-2405", - "treefmt-nix": "treefmt-nix_2" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nixarr", - "submerger", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1726626348, - "narHash": "sha256-sYV7e1B1yLcxo8/h+/hTwzZYmaju2oObNiy5iRI0C30=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "6fd52ad8bd88f39efb2c999cc971921c2fb9f3a2", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "submerger": { - "inputs": { - "nixpkgs": [ - "nixarr", - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1726842908, - "narHash": "sha256-sn3oWKcdXmy42wsBg1yCFBHHRCKVkQ+D8YnlLY/RX3A=", - "owner": "rasmus-kirk", - "repo": "submerger", - "rev": "6ffa3b28017d9d67c48a2f9de98788da05aa5ba2", - "type": "github" - }, - "original": { - "owner": "rasmus-kirk", - "repo": "submerger", - "type": "github" + "treefmt-nix": "treefmt-nix" } }, "systems": { @@ -371,36 +265,15 @@ "treefmt-nix": { "inputs": { "nixpkgs": [ - "nixarr", "nixpkgs" ] }, "locked": { - "lastModified": 1726734507, - "narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=", + "lastModified": 1729613947, + "narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1727431250, - "narHash": "sha256-uGRlRT47ecicF9iLD1G3g43jn2e+b5KaMptb59LHnvM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "879b29ae9a0378904fbbefe0dadaed43c8905754", + "rev": "aac86347fb5063960eccb19493e0cadcdb4205ca", "type": "github" }, "original": { @@ -411,7 +284,7 @@ }, "vpnconfinement": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_2", "nixpkgs": [ "nixarr", "nixpkgs" diff --git a/flake.nix b/flake.nix index 522bc21..9c99647 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs"; + #agenix.inputs.home-manager.follows = "home-manager"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";