diff options
author | sefidel <contact@sefidel.net> | 2023-03-29 20:54:19 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-04-03 18:32:29 +0900 |
commit | ce06f43476863da90dc60dcee606d2b6c5a89a8e (patch) | |
tree | 5d14946330cb09ff0ebd97bee59407fccee4d860 /modules/sops.nix | |
download | infra-ce06f43476863da90dc60dcee606d2b6c5a89a8e.tar.gz infra-ce06f43476863da90dc60dcee606d2b6c5a89a8e.zip |
project: initial commit
Diffstat (limited to 'modules/sops.nix')
-rw-r--r-- | modules/sops.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/sops.nix b/modules/sops.nix new file mode 100644 index 0000000..bd5156e --- /dev/null +++ b/modules/sops.nix @@ -0,0 +1,21 @@ +{ config, lib, inputs, ... }: + +with lib; +let + cfg = config.modules.sops; + + secretsFile = ../systems/${config.networking.hostName}/secrets/secrets.yaml; +in +{ + imports = [ + inputs.sops-nix.nixosModules.sops + ]; + + options.modules.sops = { + enable = mkEnableOption "sops secret manager"; + }; + + config = mkIf cfg.enable { + sops.defaultSopsFile = secretsFile; + }; +} |