aboutsummaryrefslogtreecommitdiffstats
path: root/lib/types/populate.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/types/populate.nix')
-rw-r--r--lib/types/populate.nix34
1 files changed, 32 insertions, 2 deletions
diff --git a/lib/types/populate.nix b/lib/types/populate.nix
index 894b8cc..6264f99 100644
--- a/lib/types/populate.nix
+++ b/lib/types/populate.nix
@@ -21,11 +21,15 @@
};
file = lib.mkOption {
apply = x:
- if lib.types.absolute-pathname.check x
+ if lib.types.absolute-pathname.check x || lib.types.package.check x
then { path = x; }
else x;
default = null;
- type = lib.types.nullOr (lib.types.either lib.types.absolute-pathname source-types.file);
+ type = lib.types.nullOr (lib.types.oneOf [
+ lib.types.absolute-pathname
+ lib.types.package
+ source-types.file
+ ]);
};
git = lib.mkOption {
default = null;
@@ -35,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
@@ -156,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 {