add all hosts to sops

This commit is contained in:
zowoq 2024-12-16 08:34:43 +10:00
parent 7478e0268a
commit b260b29a85
6 changed files with 73 additions and 12 deletions
modules/shared

View file

@ -0,0 +1,12 @@
{
config,
inputs,
lib,
...
}:
let
defaultSopsPath = "${inputs.self}/hosts/${config.networking.hostName}/secrets.yaml";
in
{
sops.defaultSopsFile = lib.mkIf (builtins.pathExists defaultSopsPath) defaultSopsPath;
}