nixos/hardware/aorus.nix

66 lines
1.7 KiB
Nix

{
lib,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot = {
initrd = {
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
kernelModules = ["dm-snapshot" "amdgpu"];
luks.devices."enc".device = "/dev/disk/by-uuid/037d5dc5-17c3-4643-9ad8-7403d280b191";
};
kernelModules = ["kvm-amd"];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/58415934-fb8e-4e36-996e-ddb61d24602a";
fsType = "btrfs";
options = ["subvol=nixos"];
};
"/boot" = {
device = "/dev/disk/by-uuid/6B2D-BD5B";
fsType = "vfat";
};
"/home" = {
device = "/dev/disk/by-uuid/58415934-fb8e-4e36-996e-ddb61d24602a";
fsType = "btrfs";
options = ["subvol=home"];
};
"/home/malte/games" = rec {
device = "/dev/mapper/${encrypted.label}";
fsType = "btrfs";
options = ["subvol=malte/games"];
encrypted = {
enable = true;
label = "luks-media";
blkDev = "/dev/disk/by-uuid/a2a4dc77-579b-4e09-ad59-6d956c168eca";
keyFile = "/mnt-root/root/luks/luks-media.key";
};
};
};
swapDevices = [{device = "/dev/disk/by-uuid/a8d98aa8-47e4-4d32-bc95-1f4a9a1c1d91";}];
# Enable bluetooth
hardware.bluetooth.enable = true;
services.hardware.bolt.enable = true;
# Tweak HDDs
services.hdparm = {
"ata-WDC_WD15EARS-00MVWB0_WD-WCAZA5802185" = {
spinDown5Secs = 1;
powerDownOnStart = true;
};
"ata-ST3000DM001-1ER166_Z500FQ9H" = {spinDown5Secs = 60;};
};
# Prevent GPP0 from waking up the device!
wakeup.GPP0 = "disable";
services.xserver.videoDrivers = lib.mkForce ["amdgpu"];
}