summaryrefslogtreecommitdiff
path: root/modules/nixos/traits/secrets.nix
blob: 57762cdf61ac511a3da98bc549cacd25b59c7b42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  config,
  lib,
  inputs,
  ...
}: let
  cfg = config.traits.secrets;
in {
  options.traits.secrets = {
    enable = lib.mkEnableOption "secrets management";
  };

  imports = [inputs.agenix.nixosModules.default];

  config = lib.mkIf cfg.enable {
    age = {
      identityPaths = ["/etc/age/key"];
    };
  };
}