mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
83 lines
2.0 KiB
Nix
83 lines
2.0 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
modulesPath,
|
|
...
|
|
}: {
|
|
imports = [
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
];
|
|
|
|
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
|
boot.initrd.kernelModules = [];
|
|
boot.kernelModules = ["kvm-intel"];
|
|
|
|
# powersave settings
|
|
boot = {
|
|
kernelParams = [
|
|
"pcie_aspm.policy=powersave"
|
|
# enable hardware accel (not powersave settings)
|
|
"i915.enable_guc=2"
|
|
];
|
|
extraModprobeConfig = ''
|
|
options snd_hda_intel power_save=1
|
|
'';
|
|
kernel.sysctl = {
|
|
"kernel.nmi_watchdog" = 0;
|
|
"vm.dirty_writeback_centisecs" = 6000;
|
|
};
|
|
};
|
|
|
|
fileSystems."/" = {
|
|
device = "none";
|
|
fsType = "tmpfs";
|
|
options = ["size=8G" "mode=755"];
|
|
};
|
|
|
|
fileSystems."/tmp" = {
|
|
device = "none";
|
|
fsType = "tmpfs";
|
|
options = ["size=32G" "mode=755"];
|
|
};
|
|
|
|
fileSystems."/nix" = {
|
|
device = "/dev/disk/by-label/fuhen";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-label/boot";
|
|
fsType = "vfat";
|
|
};
|
|
|
|
swapDevices = [
|
|
{
|
|
device = "/nix/persist/var/cache/swapfile";
|
|
size = 64 * 1024;
|
|
}
|
|
];
|
|
|
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
# still possible to use this option, but it's recommended to use it in conjunction
|
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
networking.useDHCP = lib.mkDefault true;
|
|
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
hardware.graphics = {
|
|
enable = true;
|
|
enable32Bit = true;
|
|
extraPackages = with pkgs; [
|
|
intel-media-driver
|
|
intel-compute-runtime
|
|
];
|
|
};
|
|
|
|
system.stateVersion = "22.11";
|
|
}
|