Files
nixos/x230.nix

55 lines
1.7 KiB
Nix

{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
<nixos-hardware/lenovo/thinkpad/x230>
./workstation.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 = "75";
STOP_CHARGE_THRESH_BAT0 = "90";
};
};
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;
# fileSystems."nas".options = [ "noauto" ];
programs.sway.enable = true;
services.xserver.displayManager.defaultSession = lib.mkForce "sway";
services.xserver.windowManager.i3.enable = lib.mkForce false;
}