diff options
author | tv <tv@krebsco.de> | 2024-01-11 04:37:02 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2024-01-11 11:23:11 +0100 |
commit | a6c7ecd8ba90c1eb2515cb235d85649295848e68 (patch) | |
tree | 6759fc1f2479ff6b250741dd9e2798db285ff4e3 /lib | |
parent | cbc475bdf46c115ac0f28008a531164567a12f87 (diff) |
Diffstat (limited to 'lib')
-rw-r--r-- | lib/types/populate.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/types/populate.nix b/lib/types/populate.nix index 18b5cd8..6264f99 100644 --- a/lib/types/populate.nix +++ b/lib/types/populate.nix @@ -39,6 +39,17 @@ default = null; type = lib.types.nullOr source-types.pass; }; + passage = lib.mkOption { + apply = x: + if lib.types.pathname.check x + then { dir = x; } + else x; + default = null; + type = lib.types.nullOr (lib.types.oneOf [ + lib.types.pathname + source-types.passage + ]); + }; pipe = lib.mkOption { apply = x: if lib.types.absolute-pathname.check x @@ -160,6 +171,21 @@ }; }; }; + passage = lib.types.submodule { + options = { + age = lib.mkOption { + default = "age"; + type = lib.types.pathname; + }; + dir = lib.mkOption { + type = lib.types.pathname; + }; + identities_file = lib.mkOption { + default = toString ~/.passage/identities; + type = lib.types.pathname; + }; + }; + }; pipe = lib.types.submodule { options = { command = lib.mkOption { |