chore: refactored sops secrets

This commit is contained in:
Nick 2025-11-28 20:35:50 -06:00
parent 60c469ee7f
commit 9df4b8c8a0
13 changed files with 47 additions and 42 deletions

View file

@ -20,7 +20,7 @@ in
wg0 = {
ips = [ "${ceres.wireguard.ip0}/24" ];
listenPort = service.ports.port1;
privateKeyFile = config.sops.secrets."${service.name}-private".path;
privateKeyFile = config.sops.secrets."${service.name}/private".path;
peers = [
# if you need to create a new key pair
# wg genkey | save --raw --force privatekey
@ -41,7 +41,7 @@ in
sops =
let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}-pass";
path = "${service.sops.path0}/${service.name}-${secret}";
owner = "root";
mode = "600";
};
@ -50,7 +50,7 @@ in
secrets = builtins.listToAttrs (
map
(secret: {
name = "${service.name}-${secret}";
name = "${service.name}/${secret}";
value = sopsPath secret;
})
[