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

54 lines
1 KiB
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.grub = {
device = "nodev";
efiSupport = true;
};
loader.efi.canTouchEfiVariables = true;
2020-07-11 21:02:36 +01:00
};
2021-06-26 18:55:09 +01:00
fileSystems."/" =
{ device = "/dev/mapper/crypt";
fsType = "btrfs";
};
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/c2b23e5e-82c6-45dc-b07d-a8f9be03440e";
2020-07-11 21:02:36 +01:00
2021-06-26 18:55:09 +01:00
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C380-BA8A";
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
}