dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
| 1 | # Written by hand from the CachyOS install, in the shape nixos-generate-config |
| 2 | # produces. During the install, compare it with the output of |
| 3 | # nixos-generate-config --show-hardware-config --root /mnt |
| 4 | # and keep the generated one if they differ. |
| 5 | # |
| 6 | # The NVMe drive's file systems aren't here: disko.nix defines its layout, and |
| 7 | # disko turns it into fileSystems entries. |
| 8 | { |
| 9 | config, |
| 10 | lib, |
| 11 | modulesPath, |
| 12 | ... |
| 13 | }: |
| 14 | { |
| 15 | imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; |
| 16 | |
| 17 | boot.initrd.availableKernelModules = [ |
| 18 | "nvme" |
| 19 | "xhci_pci" |
| 20 | "ahci" |
| 21 | "usbhid" |
| 22 | "usb_storage" |
| 23 | "sd_mod" |
| 24 | ]; |
| 25 | boot.kernelModules = [ "kvm-amd" ]; |
| 26 | |
| 27 | # The Kingston SATA SSD with the CachyOS backup (tools/backup-to-sata), |
| 28 | # read-only so nothing on it changes by accident. nofail: the system still |
| 29 | # boots once the drive is gone or reused. |
| 30 | fileSystems."/mnt/backup" = { |
| 31 | device = "/dev/disk/by-label/backup"; |
| 32 | fsType = "btrfs"; |
| 33 | options = [ |
| 34 | "ro" |
| 35 | "noatime" |
| 36 | "nofail" |
| 37 | "x-systemd.device-timeout=10s" |
| 38 | ]; |
| 39 | }; |
| 40 | |
| 41 | # The second drive (sdb, ext4) was commented out in CachyOS's fstab too. |
| 42 | # fileSystems."/home/vizie/Games" = { |
| 43 | # device = "/dev/disk/by-uuid/deadbeef-b2a7-406c-9704-4d07e2f38996"; |
| 44 | # fsType = "ext4"; |
| 45 | # }; |
| 46 | |
| 47 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; |
| 48 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; |
| 49 | } |