From 51157ca8accfff40055801d310a929742ee77c34 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 7 Jan 2022 14:58:34 +0100 Subject: machines/profpatsch/shiki: reference file systems by label not uuid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I want to mirror my disk to a 1:1 backup drive every so often, and referencing disks by uuid means I can’t have a runnable system from a different drive. Instead I use labels that can be shared between both drives, so that the second drive is also bootable. --- machines/profpatsch/shiki.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'machines/profpatsch') diff --git a/machines/profpatsch/shiki.nix b/machines/profpatsch/shiki.nix index bc506e3e..5a3c4f27 100644 --- a/machines/profpatsch/shiki.nix +++ b/machines/profpatsch/shiki.nix @@ -30,7 +30,7 @@ in { # Kernel boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; - boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/99922061-f883-4384-b1d9-a02d2ea88e59"; + boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-label/root"; boot.loader.systemd-boot.enable = true; boot.loader.grub.enable = false; @@ -38,13 +38,15 @@ in { # Hardware fileSystems."/" = { - device = "/dev/disk/by-uuid/d88fb591-afa8-428f-bc24-5c096bcd762d"; + device = "/dev/disk/by-label/nixos"; fsType = "btrfs"; options = [ "ssd" "subvol=/root" ]; }; - hardware.trackpoint = { - speed = 280; + fileSystems."/boot" = { + device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + options = ["nofail"]; }; powerManagement = { @@ -52,6 +54,10 @@ in { cpuFreqGovernor = "powersave"; }; + hardware.trackpoint = { + speed = 280; + }; + # hardware.pulseaudio = { # enable = true; # zeroconf.discovery.enable = true; -- cgit 1.4.1