aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-12-01 04:20:50 +0100
committerlassulus <lassulus@lassul.us>2018-12-04 23:44:06 +0100
commit140bdfdf6c87c1822e0c4ec8f497a20ad1d4cf19 (patch)
tree5fd7d7eaaa0d6423fc83d02f74e68392114e016e /lib
parenteb68146cc4848cfc0c0339c72a44a96fdeb4a1de (diff)
populate: add derivation typev1.10.0
Diffstat (limited to 'lib')
-rw-r--r--lib/types/populate.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/types/populate.nix b/lib/types/populate.nix
index 2cd3267..49996f6 100644
--- a/lib/types/populate.nix
+++ b/lib/types/populate.nix
@@ -11,6 +11,14 @@
else throw "cannot determine type";
type = lib.types.enum known-types;
};
+ derivation = lib.mkOption {
+ apply = x:
+ if lib.types.str.check x
+ then { text = x; }
+ else x;
+ default = null;
+ type = lib.types.nullOr (lib.types.either lib.types.str source-types.derivation);
+ };
file = lib.mkOption {
apply = x:
if lib.types.absolute-pathname.check x
@@ -47,6 +55,13 @@
});
source-types = {
+ derivation = lib.types.submodule {
+ options = {
+ text = lib.mkOption {
+ type = lib.types.str;
+ };
+ };
+ };
file = lib.types.submodule {
options = {
path = lib.mkOption {