fix: update secrets approach to match 'nix-secrets'

This commit is contained in:
2026-04-11 20:48:47 +02:00
parent db116cc4de
commit faf3afad79
17 changed files with 268 additions and 180 deletions

View File

@@ -1,6 +1,7 @@
{
lib,
config,
myUtils,
...
}:
@@ -18,8 +19,7 @@ in
};
config = lib.mkIf cfg.enable {
sops.secrets.hcloud-token = {
sopsFile = "${sopsDir}/hcloud-token";
sops.secrets = myUtils.mkSopsSecrets sopsDir "hcloud" [ "api-token" ] {
owner = config.users.users.${cfg.username}.name;
};
@@ -31,7 +31,7 @@ in
[[contexts]]
name = "server"
token = "${config.sops.placeholder.hcloud-token}"
token = "${config.sops.placeholder."hcloud/api-token"}"
'';
};
};