From 5b038453d2c4291c04bafec51784af1a74b1ce18 Mon Sep 17 00:00:00 2001 From: boyreau Date: Wed, 4 Nov 2026 15:56:31 +0100 Subject: [PATCH] npins partial update + various fixes and improvements --- machines/niczos/default.nix | 6 ++++ machines/niczos/hardware-configuration.nix | 4 ++- machines/niczos/security.nix | 7 +++-- modules/nix.nix | 4 +-- npins/sources.json | 32 +++++++++++----------- roles/desktop.nix | 1 + 6 files changed, 33 insertions(+), 21 deletions(-) diff --git a/machines/niczos/default.nix b/machines/niczos/default.nix index 3ac0873..203417c 100644 --- a/machines/niczos/default.nix +++ b/machines/niczos/default.nix @@ -63,6 +63,12 @@ in "/home/zo/dev" = { enable = true; dest = "/tmp/backups/"; + salvation.command = /* bash */ '' + SAVED_FILE="$(basename "$SRC")" + mv "$SRC" "/mfs/$SAVED_FILE"; + HASH="$(${ipfs} files stat --hash "/$SAVED_FILE")" + ${ipfs-cluster-ctl} pin add "$HASH"; + ''; }; "/home/zo/Documents" = { diff --git a/machines/niczos/hardware-configuration.nix b/machines/niczos/hardware-configuration.nix index 7cdbc2e..c9084fe 100644 --- a/machines/niczos/hardware-configuration.nix +++ b/machines/niczos/hardware-configuration.nix @@ -45,8 +45,10 @@ fsType = "tmpfs"; options = [ "size=1G" - "mode=600" + "mode=700" "noexec" + "uid=1000" + "gid=1000" ]; }; diff --git a/machines/niczos/security.nix b/machines/niczos/security.nix index 77f03fa..68565bd 100644 --- a/machines/niczos/security.nix +++ b/machines/niczos/security.nix @@ -1,7 +1,10 @@ { # Classic deny all networking.firewall = { - allowedTCPPorts = [ ]; - allowedUDPPorts = [ ]; + allowedTCPPorts = [ + 49676 + 1716 + ]; + allowedUDPPorts = [ 49676 ]; }; } diff --git a/modules/nix.nix b/modules/nix.nix index eb6e035..b3e98fb 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -6,12 +6,12 @@ }; nix.settings.substituters = [ - "https://attic.xuyh0120.win/lantian" + "https://cache.lantian.pub/lantian" "https://nix-community.cachix.org" "https://cache.nixos.org/" ]; nix.settings.trusted-public-keys = [ - "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" + "lantian:WVGO7vsRMSEN+h7Lp7kv6SAmrkEXgUGbbXm7jMDjBuQ=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; } diff --git a/npins/sources.json b/npins/sources.json index 65a1212..d24bb37 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -9,9 +9,9 @@ }, "branch": "release-26.05", "submodules": false, - "revision": "ec172013fa62135f58fb58dd17ae9651e8f39727", - "url": "https://github.com/nix-community/home-manager/archive/ec172013fa62135f58fb58dd17ae9651e8f39727.tar.gz", - "hash": "sha256-LWiBv9yAYFi2LPbUhDGHPGKYskJQjj2fw12OlyO1uQo=" + "revision": "24f2190587513b9c2f73db112a17844ae912d965", + "url": "https://github.com/nix-community/home-manager/archive/24f2190587513b9c2f73db112a17844ae912d965.tar.gz", + "hash": "sha256-199i7ubVSXTMl+0AAlL7cVCXSjcI+jWByMcimYjeMX0=" }, "jail.nix": { "type": "Git", @@ -36,10 +36,10 @@ "version_upper_bound": null, "release_prefix": null, "submodules": false, - "version": "v1.1.0", - "revision": "7c9a54a7f87b4539ddbd8bda09a8a5f5f9361aa9", - "url": "https://api.github.com/repos/nix-community/lanzaboote/tarball/refs/tags/v1.1.0", - "hash": "sha256-hqijVSEETttmo8Okql9/LG0Ua34hdciKW1a5zzlj8mU=" + "version": "v1.2.0", + "revision": "d4db37c6f22c63339562672babec51a8952f1325", + "url": "https://api.github.com/repos/nix-community/lanzaboote/tarball/refs/tags/v1.2.0", + "hash": "sha256-sr4Kfp6yaXUeyKL6n0Y8/ElcR3momIRC20HFc+LF22s=" }, "nix-cachyos-kernel": { "type": "Git", @@ -63,9 +63,9 @@ }, "branch": "nixos-26.05", "submodules": false, - "revision": "1bc55b9def8165e82073919945c3239903fe4dc2", - "url": "https://github.com/nixos/nixpkgs/archive/1bc55b9def8165e82073919945c3239903fe4dc2.tar.gz", - "hash": "sha256-D2aaQetafdpHxbwA4ldAxs51UX0b11pXL+JL/5L8VrM=" + "revision": "7dcdd87373d72e7a2173e4db02e20d3d7f495cfd", + "url": "https://github.com/nixos/nixpkgs/archive/7dcdd87373d72e7a2173e4db02e20d3d7f495cfd.tar.gz", + "hash": "sha256-tItrb9M8eYA6WhFgmT9tpGKueri3+wRuVA952o/2xSU=" }, "nixpkgs-unstable": { "type": "Git", @@ -76,9 +76,9 @@ }, "branch": "nixos-unstable", "submodules": false, - "revision": "6774f7bc253789b113a4f39285dc0fa100abeacc", - "url": "https://github.com/nixos/nixpkgs/archive/6774f7bc253789b113a4f39285dc0fa100abeacc.tar.gz", - "hash": "sha256-MYiI+CzL0tuWgRPjGsKCDHqYs2T3OzMlMQWOYWG0qso=" + "revision": "0bb2eedc20e4739f29e8045034f2828ad7054f8f", + "url": "https://github.com/nixos/nixpkgs/archive/0bb2eedc20e4739f29e8045034f2828ad7054f8f.tar.gz", + "hash": "sha256-fiPJ88izTVucjeo2EQ3jk4aWmLg03I1D4vxnX2QjEgE=" }, "sops-nix": { "type": "Git", @@ -89,9 +89,9 @@ }, "branch": "master", "submodules": false, - "revision": "7214124c20c1542c90deb54af50e2f53ae02711f", - "url": "https://github.com/Mic92/sops-nix/archive/7214124c20c1542c90deb54af50e2f53ae02711f.tar.gz", - "hash": "sha256-GKwH3zpy7tartuJMG0Rv/xUsdetG1QLmTVv8UKgJLmA=" + "revision": "b18e01ce148eb3efff5de2f2d3181ca53b2b2a54", + "url": "https://github.com/Mic92/sops-nix/archive/b18e01ce148eb3efff5de2f2d3181ca53b2b2a54.tar.gz", + "hash": "sha256-GoOvpdsjO5hqZuO6T6ok9u6sJEjO0iPli2zRr9oNUNw=" } }, "version": 7 diff --git a/roles/desktop.nix b/roles/desktop.nix index a89f596..3866544 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -31,6 +31,7 @@ dina-font proggyfonts font-awesome + dejavu_fonts ]; time.timeZone = "Europe/Paris";