infra/modules/nixos/common/sops-nix.nix
2024-07-24 10:27:26 +00:00

12 lines
234 B
Nix

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