1
0
Fork 0

Compare commits

...

2 Commits

3 changed files with 10 additions and 12 deletions

View File

@ -45,8 +45,6 @@
autoUpgrade = true;
};
sops.secrets.wg-monitoring = {};
clerie.monitoring = {
enable = true;
id = "391";

View File

@ -1,9 +0,0 @@
age-encryption.org/v1
-> ssh-ed25519 HwR33w JKCBhuwIMcH042SNcp+OQjgvpMogmXH9who0wy9Jh2g
waaOvyKbg8AVEQ8BnLONus0y237GK8do0nOWovYv/Hg
-> ssh-ed25519 7zj2eQ cMRXtuy4Jsl4X/qstN3wxztrEfCh+lz48+jn9cEO614
/LcwitDqSk7yEFqUeJvpWo+6lqTI8UjuBi03JxRTx/A
-> .-grease sMU_}
NOvvGJmEfeBYR6Q
--- ju0+LEUzdv2AW1Zaf1/YBo5+5ZKc+XhYUOt/p/NqYWU
Ä"'oč©®9@1źF&Ż'VÇ︪whĆ$3kj®<E280BA>v¦őę&ŰOŔ$}śN€Wp[ôČeÚM ˙eĉĚCďE@ÖĚüÚSc1

View File

@ -54,8 +54,17 @@ rec {
}) (lib.filterAttrs (name: type: (type == "regular") && (lib.hasSuffix ".age" name) ) (if builtins.pathExists secretsPath then builtins.readDir secretsPath else {}));
})
# Automatically load secrets from sops file for host
({ ... }: {
({ config, lib, ... }: {
sops.defaultSopsFile = ../hosts + "/${name}/secrets.json";
sops.secrets = let
secretFile = config.sops.defaultSopsFile;
secretNames = builtins.filter (name: name != "sops") (builtins.attrNames (builtins.fromJSON (builtins.readFile secretFile)));
secrets = if builtins.pathExists secretFile then
lib.listToAttrs (builtins.map (name: lib.nameValuePair name {}) secretNames)
else
{};
in
secrets;
})
];
};