This commit is contained in:
SebastianStork 2026-01-17 13:21:16 +01:00
parent 0d7164fe0a
commit 49c918f747
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
13 changed files with 53 additions and 53 deletions

View file

@ -18,15 +18,15 @@ let
++ lib.optional (lib.pathExists "${self}/users/seb/@${hostName}") "${self}/users/seb/@${hostName}";
};
mkDeployNode = hostname: {
hostname = "${hostname}.${
self.nixosConfigurations.${hostname}.config.custom.networking.overlay.domain
mkDeployNode = hostName: {
hostname = "${hostName}.${
self.nixosConfigurations.${hostName}.config.custom.networking.overlay.domain
}";
user = "root";
interactiveSudo = true;
profiles.system.path =
inputs.deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.${hostname};
self.nixosConfigurations.${hostName};
};
hostNames = "${self}/hosts" |> self.lib.listDirectoryNames;

View file

@ -25,14 +25,17 @@
hostCreationRules =
self.nixosConfigurations
|> lib.attrValues
|> lib.filter (value: value.config.custom.sops.enable or false)
|> lib.map (value: mkCreationRule value.config.custom.sops);
|> lib.map (host: host.config.custom.sops)
|> lib.filter (sops: sops.enable)
|> lib.map (sops: mkCreationRule sops);
userCreationRules =
self.nixosConfigurations
|> lib.attrValues
|> lib.filter (value: value.config.home-manager.users.seb.custom.sops.enable or false)
|> lib.map (value: mkCreationRule value.config.home-manager.users.seb.custom.sops);
|> lib.filter (host: host.config |> lib.hasAttr "home-manager")
|> lib.map (host: host.config.home-manager.users.seb.custom.sops)
|> lib.filter (sops: sops.enable)
|> lib.map (sops: mkCreationRule sops);
jsonConfig = { creation_rules = hostCreationRules ++ userCreationRules; } |> lib.strings.toJSON;
in