fix(hw-config): use mkForce for filesystems to avoid disko conflict

Disko auto-generates fileSystems with by-partlabel paths, but
for manual install via loop devices we need by-label paths.
mkForce ensures our paths win during evaluation.
This commit is contained in:
2026-06-06 17:23:50 -04:00
parent 897f470a16
commit 6771c9882a

View File

@@ -9,21 +9,23 @@
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
# uConsole CM5 eMMC partitions managed by disko # Filesystems for NixOS install.
# Labels defined in disko-config.nix # mkForce overrides disko's auto-generated paths so we can use
fileSystems."/" = { # filesystem labels (by-label) which work with loop device installs.
# Disko will set its own paths when nixos-anywhere is used.
fileSystems."/" = lib.mkForce {
device = "/dev/disk/by-label/NIXOS_UCM5"; device = "/dev/disk/by-label/NIXOS_UCM5";
fsType = "ext4"; fsType = "ext4";
options = [ "noatime" ]; options = [ "noatime" ];
}; };
fileSystems."/boot/firmware" = { fileSystems."/boot/firmware" = lib.mkForce {
device = "/dev/disk/by-label/FIRMWARE"; device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat"; fsType = "vfat";
options = lib.mkForce [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
fileSystems."/home" = { fileSystems."/home" = lib.mkForce {
device = "/dev/disk/by-label/NIXOS_HOME"; device = "/dev/disk/by-label/NIXOS_HOME";
fsType = "ext4"; fsType = "ext4";
options = [ "noatime" ]; options = [ "noatime" ];