From c322eef0786470b576923cdfed18e559e5f01c7c Mon Sep 17 00:00:00 2001 From: Tristan Druyen Date: Sat, 4 Nov 2023 00:38:54 +0100 Subject: [PATCH] Change nixos-desk from path to id disk dev mapping --- systems/nixos-desk/default.nix | 2 +- systems/nixos-desk/disko.nix | 36 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/systems/nixos-desk/default.nix b/systems/nixos-desk/default.nix index 8044bdd..2074dd9 100644 --- a/systems/nixos-desk/default.nix +++ b/systems/nixos-desk/default.nix @@ -28,7 +28,7 @@ }; initrd = { - availableKernelModules = [ "amdgpu" "nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod" ]; + availableKernelModules = [ "amdgpu" "ahci" "nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod" ]; kernelModules = [ ]; systemd.enable = true; }; diff --git a/systems/nixos-desk/disko.nix b/systems/nixos-desk/disko.nix index aac7df6..7384dcd 100644 --- a/systems/nixos-desk/disko.nix +++ b/systems/nixos-desk/disko.nix @@ -3,14 +3,14 @@ disk = { cryptboot_1 = { type = "disk"; - device = "/dev/disk/by-path/pci-0000:08:00.0-nvme-1"; + device = "/dev/disk/by-id/nvme-CT1000P1SSD8_2003E28202D0"; content = { type = "gpt"; partitions = { luks = { # size = "831.5G"; end = "-100G"; - label = "Linux LUKS"; + # label = "Linux LUKS"; type = "8309"; content = { type = "luks"; @@ -22,32 +22,32 @@ }; }; luksSwap = { - # TODO Create size = "32G"; - content = { - type = "luks"; - name = "cryptswap_0"; - extraOpenArgs = [ "--allow-discards" ]; - passwordFile = "/tmp/secret.key"; - additionalKeyFiles = [ ]; - content = { - type = "swap"; - }; - }; + # TODO Create + # content = { + # type = "luks"; + # name = "cryptswap_0"; + # extraOpenArgs = [ "--allow-discards" ]; + # passwordFile = "/tmp/secret.key"; + # additionalKeyFiles = [ ]; + # content = { + # type = "swap"; + # }; + # }; }; }; }; }; cryptboot_0 = { type = "disk"; - device = "/dev/disk/by-path/pci-0000:03:00.0-nvme-1"; + device = "/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_1TB_S4EWNX0NB42209Z"; content = { type = "gpt"; partitions = { luks = { # size = "831.5G"; end = "-100G"; - label = "Linux LUKS"; + # label = "Linux LUKS"; type = "8309"; content = { type = "luks"; @@ -122,7 +122,7 @@ }; }; ESP = { - label = "EFI system partition"; + label = "EFI_0"; name = "ESP"; size = "1024M"; type = "EF00"; @@ -148,14 +148,14 @@ }; sandisk = { type = "disk"; - device = "/dev/disk/by-path/pci-0000:06:00.0-ata-4"; + device = "/dev/disk/by-id/ata-SanDisk_SDSSDH3_4T00_211011800267"; content = { type = "gpt"; partitions = { luks = { # ~size = "3.4T"; end = "-250G"; - label = "Linux filesystem"; + label = "SanDisk"; type = "8300"; content = { type = "btrfs";