added disks for all devices

This commit is contained in:
twoneis 2024-07-21 02:11:12 +02:00
parent 64d3b83c76
commit 6ca492584d
2 changed files with 13 additions and 7 deletions

View file

@ -1,6 +1,7 @@
{ pkgs, ... }: { { config, pkgs, ... }: {
imports = [ imports = [
./options.nix ./options.nix
./disks.nix
]; ];
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
@ -10,7 +11,7 @@
boot = { boot = {
initrd = { initrd = {
availableKernelModules = [ "ahci" "xhci_pci" "ums_realtek" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; availableKernelModules = [ "ahci" "xhci_pci" "ums_realtek" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
luks.devices."root".device = "/dev/disk/by-uuid/470a6d23-9f08-4c4d-afbb-63d6df1ab6a6"; luks.devices."root".device = "/dev/disk/by-uuid/${config.disks.crypt}";
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
@ -26,26 +27,26 @@
fileSystems = { fileSystems = {
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/4A39-D0DF"; device = "/dev/disk/by-uuid/${config.disks.boot}";
fsType = "vfat"; fsType = "vfat";
}; };
"/" = { "/" = {
device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; device = "/dev/disk/by-uuid/${config.disks.root}";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" "noatime" ]; options = [ "subvol=root" "compress=zstd" "noatime" ];
}; };
"/nix" = { "/nix" = {
device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; device = "/dev/disk/by-uuid/${config.disks.root}";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ]; options = [ "subvol=nix" "compress=zstd" "noatime" ];
}; };
"/persist" = { "/persist" = {
device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; device = "/dev/disk/by-uuid/${config.disks.root}";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=persist" "compress=zstd" "noatime" ]; options = [ "subvol=persist" "compress=zstd" "noatime" ];
}; };
"/swap" = { "/swap" = {
device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; device = "/dev/disk/by-uuid/${config.disk.root}";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=swap" "noatime" ]; options = [ "subvol=swap" "noatime" ];
}; };

View file

@ -0,0 +1,5 @@
{ ... }: {
crypt = "470a6d23-9f08-4c4d-afbb-63d6df1ab6a6";
boot = "4A39-D0DF";
root = "75e6536a-4836-4f50-86b3-f9250edca3c0";
}