From 0780abb35dd47eaa526637ab8094ca8bf4884829 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 8 Aug 2024 21:19:42 +0200 Subject: [PATCH] fix tor unlock for chungus --- features/boot/tor.nix | 12 ++++++++---- flake.lock | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/features/boot/tor.nix b/features/boot/tor.nix index 307fc2d..349ddb6 100644 --- a/features/boot/tor.nix +++ b/features/boot/tor.nix @@ -16,10 +16,14 @@ with types; name = "initrd"; addressPrefix = "init"; }; - boot.initrd.secrets = { - "/etc/tor/onion/bootup/tor.priv" = config.clan.core.facts.services."initrd.tor".secret."tor.initrd.priv".path; - "/etc/tor/onion/bootup/hostname" = config.clan.core.facts.services."initrd.tor".secret."tor.initrd.hostname".path; - }; + boot.initrd.secrets = + mapAttrs' (name: file: nameValuePair "/etc/tor/onion/bootup/${name}" file) + (genAttrs [ + "hostname" + "hs_ed25519_public_key" + "hs_ed25519_secret_key" + ] + (secret: config.clan.core.facts.services."initrd.tor".secret."tor.initrd.${secret}".path)); boot.initrd.systemd.storePaths = [ pkgs.tor diff --git a/flake.lock b/flake.lock index 31cbd40..8ea6d5a 100644 --- a/flake.lock +++ b/flake.lock @@ -150,11 +150,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1721508205, - "narHash": "sha256-X4xVtKAkA/gVqIaCw0L5Rk9062VqlHiH0VK5En5Oi5s=", + "lastModified": 1723143645, + "narHash": "sha256-/71L2ZBM9AmUpEQC19Rf7AxA+BhIquObB8aZDkfVRz8=", "owner": "mrvandalo", "repo": "clan-fact-generators", - "rev": "b3fb36c18871861f510330c272b455eb718cd3e4", + "rev": "620c5d3185594b3e2d91e29a7590f44abae4319c", "type": "github" }, "original": {