nixos-configs/configurations/binto/hardware-configuration.nix

118 lines
2.3 KiB
Nix
Raw Permalink Normal View History

2023-11-22 15:33:16 -05:00
{
config,
modulesPath,
pkgs,
...
2024-03-12 19:44:05 -04:00
}: {
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-12 19:44:05 -04:00
kernelPackages = pkgs.linuxPackages_zen;
2024-12-11 08:15:14 -05:00
kernelParams = [
"amd_pstate=active"
# Remove these if I use plymouth module
"quiet"
"splash"
"boot.shell_on_fail"
"i915.fastboot=1"
"loglevel=3"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
2023-11-22 15:33:16 -05:00
kernelModules = ["kvm-amd"];
# Zenpower for ryzen cpu monitoring
extraModulePackages = builtins.attrValues {
inherit
(config.boot.kernelPackages)
v4l2loopback
zenpower
;
};
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 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 18:45:08 -04:00
loader = {
efi.canTouchEfiVariables = true;
2024-12-11 08:15:14 -05:00
timeout = 0;
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
"/" = {
2024-08-25 12:17:29 -04:00
device = "/dev/disk/by-label/NIXROOT";
2023-10-15 23:12:19 -04:00
fsType = "btrfs";
};
# sudo btrfs subvolume create /@swap
"/swap" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
2024-08-25 12:17:29 -04:00
# Idk why this is the subvol
options = ["subvol=@/@swap"];
};
2023-10-17 18:45:08 -04:00
"/boot" = {
2024-08-25 12:17:29 -04:00
device = "/dev/disk/by-label/NIXBOOT";
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
swapDevices = [
{
device = "/swap/swapfile";
size = 16 * 1024;
}
];
2023-10-17 18:45:08 -04:00
zramSwap.enable = true;
2023-10-17 18:45:08 -04:00
hardware = {
cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware;
2023-10-17 18:45:08 -04:00
uinput.enable = true;
};
2023-10-15 23:12:19 -04:00
2023-10-17 18:45:08 -04:00
virtualisation = {
libvirtd.enable = true;
spiceUSBRedirection.enable = true;
2023-10-17 18:45:08 -04:00
};
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
qemu
virtiofsd
;
};
nvidia = {
enable = true;
enableNvidiaSettings = true;
enableWayland = true;
enableCUDA = true;
};
2023-10-15 23:12:19 -04:00
}