aboutsummaryrefslogtreecommitdiff
path: root/modules/secrets/options.nix
blob: de15f50bb12ead8994e587e04560e1673d004071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{lib, ...}: let
  inherit (lib) mkOption;
in {
  options = {
    collinux.secrets = lib.mkOption {
      type = lib.types.attrsOf (
        lib.types.submodule ({config, ...}: {
          options = {
            name = mkOption {
              type = lib.types.str;
              default = config._module.args.name;
            };
            file = mkOption {type = lib.types.path;};
            mode = mkOption {
              type = lib.types.str;
              default = "0400";
            };
            owner = mkOption {
              type = lib.types.str;
              default = "0";
            };
            path = mkOption {
              type = lib.types.str;
              default = "/run/secrets.d/${config.name}";
            };
          };
        })
      );
      default = {};
    };
  };
}