refactor: switch from using UUIDs for filesystems to partlabels. Requires partition modifications on hosts before rebuild

This commit is contained in:
2026-10-22 11:13:06 -04:00
parent 685c709937
commit ba69916e0e
5 changed files with 96 additions and 103 deletions
+15 -24
View File
@@ -8,6 +8,7 @@
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
../shared/fs-layouts/single-disk-xfs.nix
];
boot = {
@@ -25,36 +26,26 @@
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/05376a0d-18d1-4e7b-8f75-fe052a5636ac";
fsType = "xfs";
};
# DO NOT mount by partlabel or other value other than UUID.
# Disk is a child of a VM disk from PROXMOX and WILL NOT
# be picked up automatically elsewise.
fileSystems."/mnt" = {
device = "/dev/disk/by-uuid/1432aeae-71e9-4f34-97dc-cf0fe74a4e00";
fsType = "xfs";
"/boot" = {
device = "/dev/disk/by-uuid/631D-23D2";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
"/mnt" = {
device = "/dev/disk/by-uuid/1432aeae-71e9-4f34-97dc-cf0fe74a4e00";
fsType = "xfs";
options = [
"noauto"
"x-systemd.automount"
"x-systemd.after=mount-vm-disk.service"
];
};
options = [
"noauto"
"x-systemd.automount"
"x-systemd.after=mount-vm-disk.service"
];
};
# Vergil doesn't have a swap device but ../shared/fs-layouts/single-disk-xfs.nix defines one.
# This shouldn't be an issue at runtime but explicit removal reduces log spam.
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;