76 lines
1.7 KiB
Nix
76 lines
1.7 KiB
Nix
{ config
|
|
, lib
|
|
, modulesPath
|
|
, pkgs
|
|
, ...
|
|
}:
|
|
{
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
|
|
boot.initrd.availableKernelModules = [
|
|
"xhci_pci"
|
|
"ahci"
|
|
"nvme"
|
|
"usbhid"
|
|
"usb_storage"
|
|
"sd_mod"
|
|
];
|
|
boot.kernelModules = [
|
|
"kvm-intel"
|
|
"nvidia"
|
|
"nvidia_modeset"
|
|
"nvidia_uvm"
|
|
"nvidia_drm"
|
|
];
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
boot.extraModprobeConfig = ''
|
|
options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x3; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
|
|
'';
|
|
|
|
boot.kernelParams = [
|
|
"resume_offset=533760"
|
|
"nvidia_drm.modeset=1"
|
|
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
|
];
|
|
|
|
boot.resumeDevice = "/dev/disk/by-label/ROOT";
|
|
|
|
hardware.nvidia.package = pkgs.unstable.linuxPackages.nvidiaPackages.latest;
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-label/ROOT";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@" ];
|
|
};
|
|
|
|
fileSystems."/nix" = {
|
|
device = "/dev/disk/by-label/ROOT";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@nix" ];
|
|
};
|
|
|
|
fileSystems."/swap" = {
|
|
device = "/dev/disk/by-label/ROOT";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@swap" ];
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-label/EFI";
|
|
fsType = "vfat";
|
|
};
|
|
|
|
fileSystems."/home" = {
|
|
device = "/dev/disk/by-label/HOME";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@" ];
|
|
};
|
|
|
|
swapDevices = [{ device = "/swap/swapfile"; }];
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
}
|