···
617
+
# store them in lib so we can set the same fileSystems with a
618
+
# higher prio on installation media
619
+
# This module is often over-layed onto an existing host config
620
+
# that defines `fileSystems`. We use mkOverride 60 to override
621
+
# standard values, but at the same time leave room for mkForce
622
+
# values targeted at the image build.
623
+
config.lib.isoFileSystems = {
624
+
"/" = mkOverride 60
627
+
options = [ "mode=0755" ];
630
+
# Note that /dev/root is a symlink to the actual root device
631
+
# specified on the kernel command line, created in the stage 1
633
+
"/iso" = mkOverride 60
634
+
{ device = "/dev/root";
635
+
neededForBoot = true;
639
+
# In stage 1, mount a tmpfs on top of /nix/store (the squashfs
640
+
# image) to make this a live CD.
641
+
"/nix/.ro-store" = mkOverride 60
642
+
{ fsType = "squashfs";
643
+
device = "/iso/nix-store.squashfs";
644
+
options = [ "loop" ];
645
+
neededForBoot = true;
648
+
"/nix/.rw-store" = mkOverride 60
649
+
{ fsType = "tmpfs";
650
+
options = [ "mode=0755" ];
651
+
neededForBoot = true;
654
+
"/nix/store" = mkOverride 60
655
+
{ fsType = "overlay";
656
+
device = "overlay";
658
+
"lowerdir=/nix/.ro-store"
659
+
"upperdir=/nix/.rw-store/store"
660
+
"workdir=/nix/.rw-store/work"
664
+
"/nix/.rw-store/store"
665
+
"/nix/.rw-store/work"
···
657
-
# This module is often over-layed onto an existing host config
658
-
# that defines `/`. We use mkOverride 60 to override standard
659
-
# values, but at the same time leave room for mkForce values
660
-
# targeted at the image build.
661
-
{ fsType = mkOverride 60 "tmpfs";
662
-
options = [ "mode=0755" ];
665
-
# Note that /dev/root is a symlink to the actual root device
666
-
# specified on the kernel command line, created in the stage 1
668
-
fileSystems."/iso" =
669
-
{ device = "/dev/root";
670
-
neededForBoot = true;
674
-
# In stage 1, mount a tmpfs on top of /nix/store (the squashfs
675
-
# image) to make this a live CD.
676
-
fileSystems."/nix/.ro-store" =
677
-
{ fsType = "squashfs";
678
-
device = "/iso/nix-store.squashfs";
679
-
options = [ "loop" ];
680
-
neededForBoot = true;
683
-
fileSystems."/nix/.rw-store" =
684
-
{ fsType = "tmpfs";
685
-
options = [ "mode=0755" ];
686
-
neededForBoot = true;
689
-
fileSystems."/nix/store" =
690
-
{ fsType = "overlay";
691
-
device = "overlay";
693
-
"lowerdir=/nix/.ro-store"
694
-
"upperdir=/nix/.rw-store/store"
695
-
"workdir=/nix/.rw-store/work"
700
-
"/nix/.rw-store/store"
701
-
"/nix/.rw-store/work"
708
+
fileSystems = config.lib.isoFileSystems;
boot.initrd.availableKernelModules = [ "squashfs" "iso9660" "uas" "overlay" ];