From e5e8a6a3ba2e8af8c812f841480538b8ded5c85e Mon Sep 17 00:00:00 2001 From: rasmus-kirk Date: Sat, 26 Oct 2024 10:19:16 +0000 Subject: [PATCH] pi --- .helix/languages.toml | 6 + configurations/home-manager/deck/home.nix | 8 - configurations/home-manager/pi/home.nix | 3 +- .../nixos/pi/age/airvpn-wg.conf.age | Bin 539 -> 539 bytes configurations/nixos/pi/age/wifi.age | Bin 879 -> 252 bytes configurations/nixos/pi/configuration.nix | 31 ++-- flake.lock | 140 ++++-------------- flake.nix | 1 + 8 files changed, 47 insertions(+), 142 deletions(-) create mode 100644 .helix/languages.toml 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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Y&k?ZbXI6nY;0vjG*MM-Sa@t&Yd8x2 z+>oaL7RE^<69DT#8%Ah?XX*{{`@>R)F6wX&oSN^_S;?5vE`aygmc8b?yxr`d8~w9B WDKIMJW|P_#Oo50RBoM@q>ul3~hgAsx literal 879 zcmXxixeDZD0KoCig;avQ3@lc0%rVI%u@I6>CX+Ac9LXdR#4nR;Cg)7KzMkE-86~!(EdoX+ht9)x4LVcZ#_OY7Y2S^I15rAhbub-Zk!|l7GG!1W ziZGzJlz;3cRG4$cpD5ZS#=yyWR9Czvu*>M*6htG9lK}*~+O2@=fxb_41h8&;vj(G5 zlVKw5+1dNLaf~(lV6uAGqWreI*$;nEhBmoy;X2#za2_Aw%F~ND5dm^Lh*Q1ZgoWAr zs!}NrG^g9p}gvpQg5s|?Z`IZ;v&0gg=LU=p4Wvdkcb8Be2;b!=C^nU#j{xy zxP+Z(ioar!t`Zhi80gA2LV?R1KsqZ>O0C81c6f87MD~jOzeW_2G)-`eG=~_?FF;I{ zrf`C$9kWRgz5E_4GY#zBX#-3(__-s?*woEHC*E-!$4g`vF z_MG;kG)GNW@$i)Wr>Wp$@uSN!c|@>@7RKV)qC#xq5&2T##|Fu)6>hbX?Xi|QNv#Kk zLrIlrlB~Io*g;}UbKBM$XwYz%4L7eiq=333jt|djx<{7F<>DMfHAfGcU1AjqB{_y7TC8Ce-K7aAXx1ap| p-P48s^GDiQzy 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..dcc569f 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": [ @@ -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,18 @@ }, "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": 1729941747, + "narHash": "sha256-2W+AI3nGwxokjEQtOlCbp1z0iMf3RY0ymorBlQyUo0s=", "owner": "rasmus-kirk", "repo": "nixarr", - "rev": "a3fad60dd2f5110536eb13f24e7529b2506ade6d", + "rev": "ad0a2db5e404b0c92c78ee542d2cb21817da8d83", "type": "github" }, "original": { @@ -249,11 +188,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 +204,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 +220,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,7 +245,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-2405": "nixpkgs-2405", - "treefmt-nix": "treefmt-nix_2" + "treefmt-nix": "treefmt-nix" } }, "rust-overlay": { @@ -371,36 +310,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 +329,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";