This repository has no description
1.7 kB
85 lines
1{
2 lib,
3 config,
4 pkgs,
5 ...
6}:
7{
8 # Hardware configuration from krebs/stockholm x220.nix, with updated package names
9 networking.wireless.enable = lib.mkDefault true;
10
11 hardware.enableRedistributableFirmware = true;
12
13 hardware.cpu.intel.updateMicrocode = true;
14
15 hardware.graphics.enable = true;
16
17 hardware.graphics.extraPackages = [
18 pkgs.intel-vaapi-driver
19 pkgs.libva-vdpau-driver
20 ];
21
22 services.xserver.videoDriver = "intel";
23
24 boot = {
25 initrd.luks.devices.luksroot.device = "/dev/sda3";
26 initrd.availableKernelModules = [
27 "xhci_hcd"
28 "ehci_pci"
29 "ahci"
30 "usb_storage"
31 ];
32 extraModulePackages = [
33 config.boot.kernelPackages.tp_smapi
34 config.boot.kernelPackages.acpi_call
35 ];
36 kernelModules = [
37 "kvm-intel"
38 "acpi_call"
39 "tp_smapi"
40 "tpm-rng"
41 ];
42 kernelParams = [ "acpi_backlight=none" ];
43 };
44
45 environment.systemPackages = [
46 pkgs.tpacpi-bat
47 ];
48
49 fileSystems = {
50 "/" = {
51 device = "/dev/mapper/pool-root";
52 fsType = "btrfs";
53 options = [
54 "defaults"
55 "noatime"
56 "ssd"
57 "compress=lzo"
58 ];
59 };
60 "/boot" = {
61 device = "/dev/sda2";
62 };
63 "/home" = {
64 device = "/dev/mapper/pool-home";
65 fsType = "btrfs";
66 options = [
67 "defaults"
68 "noatime"
69 "ssd"
70 "compress=lzo"
71 ];
72 };
73 };
74
75 services.logind.lidSwitch = "ignore";
76 services.logind.lidSwitchDocked = "ignore";
77
78 services.tlp.enable = true;
79 #services.tlp.extraConfig = ''
80 # START_CHARGE_THRESH_BAT0=80
81 # STOP_CHARGE_THRESH_BAT0=95
82 #'';
83
84 services.xserver.dpi = 80;
85}