diff options
author | David Arnold <dgx.arnold@gmail.com> | 2021-08-03 17:12:03 -0500 |
---|---|---|
committer | David Arnold <dgx.arnold@gmail.com> | 2021-08-03 18:28:14 -0500 |
commit | 9e42d02047fe1153555f8c81039cb48135311e6d (patch) | |
tree | 4df73cd4c11afd55922f34e2b8132d99dd480b19 /nixos/modules/installer/cd-dvd/iso-image.nix | |
parent | 2af2d3146d79866ae65ca1883527daa010669b07 (diff) | |
download | nixpkgs-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/iso-image.nix')
-rw-r--r-- | nixos/modules/installer/cd-dvd/iso-image.nix | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 1f59e8cb34d..78cbf14bbaf 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -614,14 +614,11 @@ in }; }; - # store them in lib so we can set the same fileSystems with a - # higher prio on installation media - # This module is often over-layed onto an existing host config - # that defines `fileSystems`. We use mkOverride 60 to override - # standard values, but at the same time leave room for mkForce - # values targeted at the image build. + + # store them in lib so we can mkImageMediaOverride the + # entire file system layout in installation media (only) config.lib.isoFileSystems = { - "/" = mkOverride 60 + "/" = mkImageMediaOverride { fsType = "tmpfs"; options = [ "mode=0755" ]; @@ -630,7 +627,7 @@ in # Note that /dev/root is a symlink to the actual root device # specified on the kernel command line, created in the stage 1 # init script. - "/iso" = mkOverride 60 + "/iso" = mkImageMediaOverride { device = "/dev/root"; neededForBoot = true; noCheck = true; @@ -638,20 +635,20 @@ in # In stage 1, mount a tmpfs on top of /nix/store (the squashfs # image) to make this a live CD. - "/nix/.ro-store" = mkOverride 60 + "/nix/.ro-store" = mkImageMediaOverride { fsType = "squashfs"; device = "/iso/nix-store.squashfs"; options = [ "loop" ]; neededForBoot = true; }; - "/nix/.rw-store" = mkOverride 60 + "/nix/.rw-store" = mkImageMediaOverride { fsType = "tmpfs"; options = [ "mode=0755" ]; neededForBoot = true; }; - "/nix/store" = mkOverride 60 + "/nix/store" = mkImageMediaOverride { fsType = "overlay"; device = "overlay"; options = [ |