Simon Bruder
d6fd45cd57
Even though I didn’t notice a problem when trying to record from it on battery, it doesn’t hurt to be on the safe side.
64 lines
1.6 KiB
Nix
64 lines
1.6 KiB
Nix
{ config, lib, modulesPath, pkgs, ... }:
|
|
|
|
{
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
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";
|
|
};
|
|
};
|
|
|
|
powerManagement = {
|
|
cpuFreqGovernor = "schedutil";
|
|
};
|
|
services.tlp = {
|
|
enable = true;
|
|
settings = {
|
|
START_CHARGE_THRESH_BAT0 = 75;
|
|
STOP_CHARGE_THRESH_BAT0 = 92;
|
|
# TODO TLP 1.4: Rename to USB_DENYLIST
|
|
USB_BLACKLIST = lib.concatStringsSep " " [
|
|
"0499:172f" # Steinberg UR22C TODO TLP 1.4: Remove (has USB_EXCLUDE_AUDIO by default)
|
|
];
|
|
};
|
|
};
|
|
|
|
# Most of the time I want to use both screens at the same time and suspend it
|
|
# regularily by closing the lid
|
|
services.logind.lidSwitchDocked = config.services.logind.lidSwitch;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
radeontop
|
|
];
|
|
}
|