summary refs log tree commit diff
path: root/pkgs/lib/types.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib/types.nix')
-rw-r--r--pkgs/lib/types.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix
index 01a5d98fca6..c806e922e35 100644
--- a/pkgs/lib/types.nix
+++ b/pkgs/lib/types.nix
@@ -40,7 +40,7 @@ rec {
     };
 
     
-  types = {
+  types = rec {
 
     inferred = mkOptionType {
       name = "inferred type";
@@ -63,6 +63,12 @@ rec {
       merge = lib.concatStrings;
     };
 
+    envVar = mkOptionType {
+      name = "environment variable";
+      inherit (string) check;
+      merge = lib.concatStringsSep ":";
+    };
+
     attrs = mkOptionType {
       name = "attribute set";
       check = lib.traceValIfNot builtins.isAttrs;