2021-10-06 16:26:52 +02:00
|
|
|
{ config, lib, modulesPath, pkgs, ... }:
|
2021-09-30 07:32:03 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
kernelModules = [ "kvm-amd" ];
|
|
|
|
loader = {
|
|
|
|
grub.enable = false;
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [ "aesni_intel" "cryptd" "nvme" "sd_mod" "sdhci_pci" "usb_storage" "xhci_pci" ];
|
|
|
|
luks.devices = {
|
|
|
|
root = {
|
|
|
|
name = "root";
|
|
|
|
device = "/dev/disk/by-uuid/16d97095-34d2-4422-819c-d1ddc9c3ce1e";
|
|
|
|
preLVM = true;
|
|
|
|
allowDiscards = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-11-01 16:27:13 +01:00
|
|
|
extraModprobeConfig = ''
|
|
|
|
options thinkpad_acpi fan_control=1
|
|
|
|
'';
|
2021-09-30 07:32:03 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-uuid/cd7ed921-4b59-4de4-b39e-9679571ce034";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "discard=async" "noatime" "compress=zstd" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/861A-D1A2";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-10-05 22:53:49 +02:00
|
|
|
powerManagement = {
|
|
|
|
cpuFreqGovernor = "schedutil";
|
|
|
|
};
|
2021-10-11 17:48:40 +02:00
|
|
|
services.tlp = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
START_CHARGE_THRESH_BAT0 = 75;
|
|
|
|
STOP_CHARGE_THRESH_BAT0 = 92;
|
2021-12-06 16:03:45 +01:00
|
|
|
USB_DENYLIST = lib.concatStringsSep " " [
|
2021-10-13 17:29:12 +02:00
|
|
|
];
|
2021-10-11 17:48:40 +02:00
|
|
|
};
|
|
|
|
};
|
2021-09-30 07:32:03 +02:00
|
|
|
|
2022-01-10 17:41:57 +01:00
|
|
|
# logind fails to detect that the system is still docked when the external
|
|
|
|
# monitor is switched off via dpms
|
|
|
|
services.logind.lidSwitchExternalPower = "ignore";
|
2021-10-05 22:43:01 +02:00
|
|
|
|
2021-10-06 16:26:52 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
radeontop
|
|
|
|
];
|
2021-09-30 07:32:03 +02:00
|
|
|
}
|