62 lines
1.5 KiB
Nix
62 lines
1.5 KiB
Nix
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||
# and may be overwritten by future invocations. Please make changes
|
||
# to /etc/nixos/configuration.nix instead.
|
||
{ config, lib, pkgs, modulesPath, ... }:
|
||
|
||
{
|
||
imports =
|
||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||
];
|
||
|
||
# boot
|
||
efi.enable = true;
|
||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
|
||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||
|
||
# kernel
|
||
boot.kernelModules = [ "kvm-amd" ];
|
||
boot.extraModulePackages = [ ];
|
||
|
||
# firmware
|
||
firmware.x86_64.enable = true;
|
||
hardware.enableAllFirmware = true;
|
||
|
||
# gpu
|
||
services.xserver.videoDrivers = [ "nvidia" ];
|
||
hardware.nvidia = {
|
||
modesetting.enable = true; # for nvidia-vaapi-driver
|
||
prime = {
|
||
reverseSync.enable = true;
|
||
offload.enableOffloadCmd = true;
|
||
nvidiaBusId = "PCI:1:0:0";
|
||
amdgpuBusId = "PCI:4:0:0";
|
||
};
|
||
};
|
||
|
||
# disks
|
||
boot.initrd.luks.devices."enc-pv" = {
|
||
device = "/dev/disk/by-uuid/c1822e5f-4137-44e1-885f-954e926583ce";
|
||
allowDiscards = true;
|
||
};
|
||
fileSystems."/" =
|
||
{ device = "/dev/vg/root";
|
||
fsType = "btrfs";
|
||
options = [ "subvol=root" ];
|
||
};
|
||
fileSystems."/home" =
|
||
{ device = "/dev/vg/root";
|
||
fsType = "btrfs";
|
||
options = [ "subvol=home" ];
|
||
};
|
||
fileSystems."/boot" =
|
||
{ device = "/dev/disk/by-uuid/2C85-2B59";
|
||
fsType = "vfat";
|
||
};
|
||
swapDevices =
|
||
[ { device = "/dev/vg/swap"; }
|
||
];
|
||
|
||
# high-resolution display
|
||
hardware.video.hidpi.enable = lib.mkDefault true;
|
||
}
|