dotfiles/nixos/boxes/foureighty/hardware-configuration.nix

50 lines
947 B
Nix
Raw Normal View History

2021-06-12 10:31:25 +01:00
{ config, lib, pkgs, inputs, ... }:
2020-07-11 21:02:36 +01:00
{
2021-06-12 10:31:25 +01:00
imports = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
];
2020-07-11 21:02:36 +01:00
2020-07-25 09:56:03 +01:00
boot = {
kernel.sysctl = {
2021-06-12 10:46:14 +01:00
"vm.swappiness" = 95;
2020-07-25 09:56:03 +01:00
};
2020-07-11 21:02:36 +01:00
2021-06-12 10:31:25 +01:00
kernelModules = [ "kvm-intel" ];
2020-07-25 09:56:03 +01:00
initrd = {
kernelModules = [ "dm-snapshot" ];
availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
};
loader.efi.canTouchEfiVariables = true;
2021-06-26 19:12:31 +01:00
loader.systemd-boot.enable = true;
2020-07-11 21:02:36 +01:00
};
2021-06-26 19:12:31 +01:00
boot.initrd.luks.devices."crypt".device = "replaceme";
fileSystems."/" = {
device = "replaceme";
2021-06-26 18:55:09 +01:00
fsType = "btrfs";
};
2021-06-26 19:12:31 +01:00
fileSystems."/boot" = {
device = "replaceme";
2021-06-26 18:55:09 +01:00
fsType = "vfat";
};
2020-07-11 21:02:36 +01:00
swapDevices = [ ];
2021-06-26 18:55:09 +01:00
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.video.hidpi.enable = lib.mkDefault true;
2020-07-25 09:56:03 +01:00
zramSwap = {
enable = true;
algorithm = "zstd";
2021-06-12 10:46:14 +01:00
memoryPercent = 75;
2020-07-25 09:56:03 +01:00
};
nix.maxJobs = 2;
nix.buildCores = 6;
2020-07-11 21:02:36 +01:00
}