52 lines
1.5 KiB
Nix
52 lines
1.5 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
imports =
|
|
[ # Include the results of the hardware scan.
|
|
<nixos-hardware/lenovo/thinkpad/x230>
|
|
./workstation.nix
|
|
private/x230.nix
|
|
];
|
|
|
|
# Use the GRUB 2 boot loader.
|
|
boot.loader.grub.enable = true;
|
|
# boot.loader.grub.efiSupport = true;
|
|
# boot.loader.grub.efiInstallAsRemovable = true;
|
|
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
# Define on which hard drive you want to install Grub.
|
|
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
|
boot.initrd.luks.devices.crypt.device = "/dev/disk/by-id/md-name-nixos:0-part2";
|
|
boot.swraid.enable = true;
|
|
boot.swraid.mdadmConf = ''
|
|
PROGRAM /run/current-system/sw/bin/false
|
|
'';
|
|
boot.resumeDevice = "/dev/disk/by-label/swapdev";
|
|
swapDevices = [
|
|
{ device = "/dev/disk/by-label/swapdev"; }
|
|
];
|
|
services.logind.powerKey = "hibernate";
|
|
services.tlp = {
|
|
enable = true;
|
|
settings = {
|
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
|
|
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
|
|
|
START_CHARGE_THRESH_BAT0 = "90";
|
|
STOP_CHARGE_THRESH_BAT0 = "95";
|
|
};
|
|
};
|
|
powerManagement.powertop.enable = true;
|
|
hardware.bluetooth.enable = true;
|
|
networking.hostName = "cyberboobs";
|
|
environment.systemPackages = with pkgs; [
|
|
bluez
|
|
powertop
|
|
];
|
|
services.logind.lidSwitch = "suspend-then-hibernate";
|
|
systemd.sleep.extraConfig = "HibernateDelaySec=1h";
|
|
# services.upower.enable = true;
|
|
}
|