snowflake/hosts/ame/hardware.nix

51 lines
1 KiB
Nix

{
inputs,
config,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
];
boot = {
kernelModules = ["kvm-intel"];
extraModulePackages = [];
loader = {
systemd-boot = {
enable = true;
configurationLimit = 8;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
initrd = {
availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
kernelModules = [];
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid";
fsType = "ext4";
};
};
zramSwap = {
enable = true;
swapDevices = 1;
algorithm = "zstd";
};
networking.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;
}