summaryrefslogtreecommitdiffstats
path: root/lib/types
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-11-20 15:46:09 +0100
committerGitHub <noreply@github.com>2021-11-20 15:46:09 +0100
commit13ae434b140035e7e2664bd5a8ef4c475413b2e0 (patch)
treece553f6ded649b4b33772b4dd6c4d205a27de5ca /lib/types
parentb78e4d5a925d2987b52b33e98c3aeae12c41d019 (diff)
parent9fc8cbf8e826d4c8a118f37202ab3f335341082a (diff)
Merge pull request #35 from erikarvstedt/fix-ssh-port
target: use default port from SSH config
Diffstat (limited to 'lib/types')
-rw-r--r--lib/types/populate.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/types/populate.nix b/lib/types/populate.nix
index 894b8cc..18b5cd8 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;