From 1ac982fbdb3f992a694ae2fcc0c185153eccbfe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Apr 2024 15:10:08 +0200 Subject: [PATCH 1/2] set networking.hostName to clanCore.machineName --- lib/build-clan/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/build-clan/default.nix b/lib/build-clan/default.nix index 4234189ea..ec5e6e1a3 100644 --- a/lib/build-clan/default.nix +++ b/lib/build-clan/default.nix @@ -58,6 +58,7 @@ let (machines.${name} or { }) ( { + networking.hostName = lib.mkDefault name; clanCore.clanName = clanName; clanCore.clanIcon = clanIcon; clanCore.clanDir = directory; From 19a62817f2aa76f97d6ad591f4cda49e68c0d753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Apr 2024 15:10:27 +0200 Subject: [PATCH 2/2] sops: strip out clanCore.machineName instead of networking.hostName --- nixosModules/clanCore/facts/secret/sops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixosModules/clanCore/facts/secret/sops.nix b/nixosModules/clanCore/facts/secret/sops.nix index fcd4fec5c..3aeac7d99 100644 --- a/nixosModules/clanCore/facts/secret/sops.nix +++ b/nixosModules/clanCore/facts/secret/sops.nix @@ -46,7 +46,7 @@ in clanCore.facts.secretModule = "clan_cli.facts.secret_modules.sops"; clanCore.facts.secretUploadDirectory = lib.mkDefault "/var/lib/sops-nix"; sops.secrets = builtins.mapAttrs (name: _: { - name = lib.strings.removePrefix "${config.networking.hostName}-" name; + name = lib.strings.removePrefix "${config.clanCore.machineName}-" name; sopsFile = config.clanCore.clanDir + "/sops/secrets/${name}/secret"; format = "binary"; }) secrets;