diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index 0a451648eb1..ec2d6dc0620 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -7,7 +7,7 @@ let - inherit (pkgs.lib) mkOption; + inherit (pkgs.lib) mkOption types; options = { @@ -53,6 +53,16 @@ let Whether to show a nice splash screen while booting. "; }; + + fileSystems = mkOption { + options.neededForBoot = mkOption { + default = false; + type = types.enable; + description = " + Mount this file system to boot on NixOS. + "; + }; + }; }; @@ -165,7 +175,7 @@ let # booting (such as the FS containing /nix/store, or an FS needed for # mounting /, like / on a loopback). fileSystems = pkgs.lib.filter - (fs: fs.mountPoint == "/" || (fs ? neededForBoot && fs.neededForBoot)) + (fs: fs.mountPoint == "/" || fs.neededForBoot) config.fileSystems; diff --git a/modules/tasks/filesystems.nix b/modules/tasks/filesystems.nix index a6c5d9370ef..f7e75d32700 100644 --- a/modules/tasks/filesystems.nix +++ b/modules/tasks/filesystems.nix @@ -97,16 +97,6 @@ let . "; }; - - # Should be moved inside boot-stage-1.nix - neededForBoot = mkOption { - default = false; - type = types.enable; - description = " - Mount this file system to boot on NixOS. - "; - }; - }; };