48 lines
1001 B
Nix
48 lines
1001 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
# Kernel configuration
|
|
boot = {
|
|
kernelParams = [ "zfs.zfs_arc_max=536870912" ];
|
|
kernelModules = [ "i915" "acpi_call" ];
|
|
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
|
supportedFilesystems = [ "zfs" ];
|
|
};
|
|
|
|
# Intel CPU tweaks
|
|
hardware.cpu.intel.updateMicrocode =
|
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
hardware.opengl.extraPackages = with pkgs; [
|
|
vaapiIntel
|
|
vaapiVdpau
|
|
libvdpau-va-gl
|
|
];
|
|
|
|
# Bootloader configuration
|
|
boot.loader = {
|
|
timeout = 2;
|
|
grub = {
|
|
efiSupport = true;
|
|
configurationLimit = 50;
|
|
copyKernels = true;
|
|
};
|
|
};
|
|
|
|
# Run Nix garbage collector, while avoiding compiling
|
|
nix = {
|
|
gc = {
|
|
automatic = true;
|
|
options = "--delete-older-than 14d";
|
|
};
|
|
extraOptions = ''
|
|
keep-outputs = true
|
|
gc-keep-outputs = true
|
|
'';
|
|
};
|
|
|
|
# Clean tmp directory on shutdown
|
|
boot.cleanTmpDir = true;
|
|
|
|
}
|