summary refs log tree commit diff
path: root/lib/types.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-02-13 12:08:15 -0500
committerShea Levy <shea@shealevy.com>2014-02-13 12:10:50 -0500
commitc8f1a6ac1eaa549169cd8a154ad8f1947fe30311 (patch)
treebec533eba179c7f108da46d997b019d5d4a3375b /lib/types.nix
parent4fd825cc94cf58d95007cd513ac5cb8e0c8409af (diff)
downloadnixpkgs-c8f1a6ac1eaa549169cd8a154ad8f1947fe30311.tar
nixpkgs-c8f1a6ac1eaa549169cd8a154ad8f1947fe30311.tar.gz
nixpkgs-c8f1a6ac1eaa549169cd8a154ad8f1947fe30311.tar.bz2
nixpkgs-c8f1a6ac1eaa549169cd8a154ad8f1947fe30311.tar.lz
nixpkgs-c8f1a6ac1eaa549169cd8a154ad8f1947fe30311.tar.xz
nixpkgs-c8f1a6ac1eaa549169cd8a154ad8f1947fe30311.tar.zst
nixpkgs-c8f1a6ac1eaa549169cd8a154ad8f1947fe30311.zip
Revert "Add nixosSubmodule option type"
Moving recent types work to a separate branch for now

This reverts commit ca1c5cfa8fff055c74786dbe0d2ca889ae462365.
Diffstat (limited to 'lib/types.nix')
-rw-r--r--lib/types.nix19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/types.nix b/lib/types.nix
index ac84ef29611..afc8f80eb0e 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -195,25 +195,6 @@ rec {
             args = { name = ""; }; }).options;
       };
 
-    nixosSubmodule = nixos: args: mkOptionType rec {
-      name = "submodule containing a NixOS config";
-      check = x: isAttrs x || isFunction x;
-      merge = loc: defs:
-        let
-          coerce = def: if isFunction def then def else { config = def; };
-        in (import (nixos + "/lib/eval-config.nix") (args // {
-          modules = (args.modules or []) ++
-            map (def: { _file = def.file; imports = [(coerce def.value)]; }) defs;
-
-          prefix = loc;
-        })).config;
-      getSubOptions = prefix: (import (nixos + "/lib/eval-config.nix") (args // {
-        modules = (args.modules or []);
-
-        inherit prefix;
-      })).options;
-    };
-
     # Obsolete alternative to configOf.  It takes its option
     # declarations from the ‘options’ attribute of containing option
     # declaration.