summaryrefslogtreecommitdiffstats
path: root/nixos/modules/installer/netboot/netboot.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/netboot/netboot.nix
parent2af2d3146d79866ae65ca1883527daa010669b07 (diff)
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/netboot/netboot.nix')
-rw-r--r--nixos/modules/installer/netboot/netboot.nix12
1 files changed, 4 insertions, 8 deletions
diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix
index adcaf9d1a335..28b6c39b29df 100644
--- a/nixos/modules/installer/netboot/netboot.nix
+++ b/nixos/modules/installer/netboot/netboot.nix
@@ -29,31 +29,27 @@ with lib;
then []
else [ pkgs.grub2 pkgs.syslinux ]);
- # 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.
- fileSystems."/" = mkOverride 60
+ fileSystems."/" = mkImageMediaOverride
{ fsType = "tmpfs";
options = [ "mode=0755" ];
};
# In stage 1, mount a tmpfs on top of /nix/store (the squashfs
# image) to make this a live CD.
- fileSystems."/nix/.ro-store" = mkOverride 60
+ fileSystems."/nix/.ro-store" = mkImageMediaOverride
{ fsType = "squashfs";
device = "../nix-store.squashfs";
options = [ "loop" ];
neededForBoot = true;
};
- fileSystems."/nix/.rw-store" = mkOverride 60
+ fileSystems."/nix/.rw-store" = mkImageMediaOverride
{ fsType = "tmpfs";
options = [ "mode=0755" ];
neededForBoot = true;
};
- fileSystems."/nix/store" = mkOverride 60
+ fileSystems."/nix/store" = mkImageMediaOverride
{ fsType = "overlay";
device = "overlay";
options = [