summary refs log tree commit diff
path: root/nixos/modules/installer/cd-dvd/installation-cd-base.nix
diff options
context:
space:
mode:
authorDavid Arnold <dgx.arnold@gmail.com>2021-08-03 17:12:03 -0500
committerDavid Arnold <dgx.arnold@gmail.com>2021-08-03 18:28:14 -0500
commit9e42d02047fe1153555f8c81039cb48135311e6d (patch)
tree4df73cd4c11afd55922f34e2b8132d99dd480b19 /nixos/modules/installer/cd-dvd/installation-cd-base.nix
parent2af2d3146d79866ae65ca1883527daa010669b07 (diff)
downloadnixpkgs-9e42d02047fe1153555f8c81039cb48135311e6d.tar
nixpkgs-9e42d02047fe1153555f8c81039cb48135311e6d.tar.gz
nixpkgs-9e42d02047fe1153555f8c81039cb48135311e6d.tar.bz2
nixpkgs-9e42d02047fe1153555f8c81039cb48135311e6d.tar.lz
nixpkgs-9e42d02047fe1153555f8c81039cb48135311e6d.tar.xz
nixpkgs-9e42d02047fe1153555f8c81039cb48135311e6d.tar.zst
nixpkgs-9e42d02047fe1153555f8c81039cb48135311e6d.zip
lib/modules: add mkImageMediaOverride
so the underlaying use case of the preceding commit is so
generic, that we gain a lot in reasoning to give it an
appropriate name.

As the comment states:
image media needs to override host config short of mkForce
Diffstat (limited to 'nixos/modules/installer/cd-dvd/installation-cd-base.nix')
-rw-r--r--nixos/modules/installer/cd-dvd/installation-cd-base.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix
index ec837b432ce..618057618d0 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-base.nix
+++ b/nixos/modules/installer/cd-dvd/installation-cd-base.nix
@@ -30,11 +30,10 @@ with lib;
   # Add Memtest86+ to the CD.
   boot.loader.grub.memtest86.enable = true;
 
-  # On a fresh machine, before formatting, an installation
-  # media cannot assume an existing file system layout such
-  # as might be defined by the encapsulated host config.
-  swapDevices = mkOverride 60 [ ];
-  fileSystems = mkOverride 60 config.lib.isoFileSystems;
+  # An installation media cannot tolerate a host config defined file
+  # system layout on a fresh machine, before it has been formatted.
+  swapDevices = mkImageMediaOverride [ ];
+  fileSystems = mkImageMediaOverride config.lib.isoFileSystems;
 
   boot.postBootCommands = ''
     for o in $(</proc/cmdline); do