feat: use part labels instead of uuids in hardware config

This commit is contained in:
2026-05-21 10:30:53 +02:00
parent 0521e895a2
commit 3f7d4343fc
2 changed files with 35 additions and 23 deletions
+5 -3
View File
@@ -15,12 +15,12 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/0eb29109-abd1-49af-859a-1c5009e2482f"; device = "/dev/disk/by-label/nixos";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/EE00-3849"; device = "/dev/disk/by-label/boot";
fsType = "vfat"; fsType = "vfat";
options = [ options = [
"fmask=0077" "fmask=0077"
@@ -28,7 +28,9 @@
]; ];
}; };
swapDevices = [ ]; swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
+24 -14
View File
@@ -1,31 +1,41 @@
# Do not modify this file! It was generated by nixos-generate-config {
# and may be overwritten by future invocations. Please make changes config,
# to /etc/nixos/configuration.nix instead. lib,
{ config, lib, pkgs, modulesPath, ... }: modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/e9aebe22-0d9f-460f-a576-f1c44f6050b0"; device = "/dev/disk/by-label/nixos";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/4705-B811"; device = "/dev/disk/by-label/boot";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
"fmask=0077"
"dmask=0077"
];
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/a81582c7-be0f-4070-b3e8-64e24b8483d2"; } { device = "/dev/disk/by-label/swap"; }
]; ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";