2023-11-22 15:33:16 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
modulesPath,
|
2024-03-08 16:59:41 -05:00
|
|
|
nixpkgs-nvidia,
|
2023-11-22 15:33:16 -05:00
|
|
|
pkgs,
|
|
|
|
...
|
2024-03-08 16:59:41 -05:00
|
|
|
}: let
|
|
|
|
nvidiaPkgs = import nixpkgs-nvidia {
|
|
|
|
inherit (pkgs) system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
2023-11-22 15:33:16 -05:00
|
|
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
2023-10-17 18:45:08 -04:00
|
|
|
|
|
|
|
boot = {
|
2024-03-08 16:59:41 -05:00
|
|
|
kernelPackages = nvidiaPkgs.linuxPackages_zen;
|
2024-02-17 14:52:43 -05:00
|
|
|
|
|
|
|
kernelParams = ["amd_pstate=active"];
|
2023-11-22 15:33:16 -05:00
|
|
|
kernelModules = ["kvm-amd"];
|
2024-02-17 14:52:43 -05:00
|
|
|
|
|
|
|
# Zenpower for ryzen cpu monitoring
|
2023-10-17 18:45:08 -04:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
|
|
|
v4l2loopback
|
2024-02-17 14:52:43 -05:00
|
|
|
zenpower
|
2023-10-15 23:12:19 -04:00
|
|
|
];
|
2024-02-17 14:52:43 -05:00
|
|
|
blacklistedKernelModules = ["k10temp"];
|
2023-10-15 23:12:19 -04:00
|
|
|
|
2023-11-22 15:33:16 -05:00
|
|
|
supportedFilesystems = ["ntfs"];
|
2023-10-17 21:17:10 -04:00
|
|
|
|
2023-10-17 18:45:08 -04:00
|
|
|
consoleLogLevel = 0;
|
2023-10-17 17:53:10 -04:00
|
|
|
|
2023-10-17 18:45:08 -04:00
|
|
|
initrd = {
|
|
|
|
verbose = false;
|
|
|
|
systemd.enable = true;
|
2023-11-22 15:33:16 -05:00
|
|
|
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
2023-10-17 18:45:08 -04:00
|
|
|
};
|
2023-10-17 17:53:10 -04:00
|
|
|
|
2023-10-17 18:45:08 -04:00
|
|
|
loader = {
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
timeout = 2;
|
2024-02-17 14:52:43 -05:00
|
|
|
|
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
consoleMode = "max";
|
|
|
|
configurationLimit = 30;
|
|
|
|
};
|
2023-10-17 18:45:08 -04:00
|
|
|
};
|
|
|
|
};
|
2023-10-15 23:12:19 -04:00
|
|
|
|
2023-10-17 18:45:08 -04:00
|
|
|
fileSystems = {
|
2023-11-22 15:33:16 -05:00
|
|
|
"/" = {
|
2023-10-17 18:45:08 -04:00
|
|
|
device = "/dev/disk/by-uuid/560976b6-85e0-44ca-bb73-e15a78e9c449";
|
2023-10-15 23:12:19 -04:00
|
|
|
fsType = "btrfs";
|
2023-11-22 15:33:16 -05:00
|
|
|
options = ["subvol=@"];
|
2023-10-15 23:12:19 -04:00
|
|
|
};
|
|
|
|
|
2023-10-17 18:45:08 -04:00
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/1407-A10C";
|
2023-10-15 23:12:19 -04:00
|
|
|
fsType = "vfat";
|
|
|
|
};
|
2023-10-17 21:17:10 -04:00
|
|
|
|
|
|
|
"/run/media/matt/Games" = {
|
|
|
|
device = "/dev/disk/by-uuid/da62f4ee-d4a6-4fdd-ab12-9c5e131c6f30";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
2023-10-17 18:45:08 -04:00
|
|
|
};
|
2023-10-15 23:12:19 -04:00
|
|
|
|
2023-10-17 18:45:08 -04:00
|
|
|
zramSwap.enable = true;
|
|
|
|
hardware = {
|
|
|
|
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
uinput.enable = true;
|
|
|
|
};
|
2023-10-15 23:12:19 -04:00
|
|
|
|
2023-10-17 18:45:08 -04:00
|
|
|
virtualisation = {
|
|
|
|
libvirtd.enable = true;
|
2024-01-21 20:08:27 -05:00
|
|
|
spiceUSBRedirection.enable = true;
|
2023-10-17 18:45:08 -04:00
|
|
|
};
|
2023-12-04 01:13:24 -05:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
qemu
|
2023-12-28 22:47:21 -05:00
|
|
|
virtiofsd
|
2023-12-04 01:13:24 -05:00
|
|
|
];
|
2024-03-03 16:13:56 -05:00
|
|
|
|
|
|
|
nvidia = {
|
|
|
|
enable = true;
|
|
|
|
enableNvidiaSettings = true;
|
|
|
|
enableWayland = true;
|
|
|
|
enableCUDA = true;
|
|
|
|
};
|
2023-10-15 23:12:19 -04:00
|
|
|
}
|