diff --git a/modules/legacy.nix b/modules/legacy.nix index 8b4d7199ae0..6359682f17c 100644 --- a/modules/legacy.nix +++ b/modules/legacy.nix @@ -3,7 +3,6 @@ ../system/assertion.nix ../system/nixos-environment.nix ../system/nixos-installer.nix - ../system/system-options.nix ../upstart-jobs/cron/locate.nix ../upstart-jobs/filesystems.nix ../upstart-jobs/guest-users.nix diff --git a/modules/system/activation/top-level.nix b/modules/system/activation/top-level.nix index 306037d1f57..d09f34264e9 100644 --- a/modules/system/activation/top-level.nix +++ b/modules/system/activation/top-level.nix @@ -2,6 +2,25 @@ let + options = { + + system.build = pkgs.lib.mkOption { + default = {}; + description = '' + Attribute set of derivations used to setup the system. + ''; + }; + + nesting.children = pkgs.lib.mkOption { + default = []; + description = '' + Additional configurations to build. + ''; + }; + + }; + + # This attribute is responsible for creating boot entries for # child configuration. They are only (directly) accessible # when the parent configuration is boot default. For example, @@ -77,7 +96,7 @@ let in { + require = [options]; system.build.system = system; - } diff --git a/system/options.nix b/system/options.nix index eb51250d28e..8c725255487 100644 --- a/system/options.nix +++ b/system/options.nix @@ -80,15 +80,5 @@ in }; - nesting = { - children = mkOption { - default = []; - description = " - Additional configurations to build. - "; - }; - }; - - require = import ../modules/module-list.nix; } diff --git a/system/system-options.nix b/system/system-options.nix deleted file mode 100644 index 25bc58b5704..00000000000 --- a/system/system-options.nix +++ /dev/null @@ -1,30 +0,0 @@ -# this file contains all extendable options originally defined in system.nix -# TODO: split it to make it readable. -{pkgs, config, ...}: - -with pkgs.lib; - -###### interface -let - - option = { - system = { - build = mkOption { - default = {}; - description = '' - Attribute set of derivations used to setup the system. - ''; - }; - }; - }; -in - -###### implementation -{ - require = [ - option - - # config.system.activationScripts - # ../system/activate-configuration.nix - ]; -}