blob: abda9f808db706975966aa3ed04535a96808efc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ config, pkgs, hardware, ... }:
{
imports = [
./configuration.nix
];
# Use the gummiboot efi boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.timeout = 0;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices = [
{
device = "/dev/sda2";
name = "crypt";
preLVM = true;
allowDiscards = true;
}
];
boot.kernelModules = ["tp_smapi" "thinkpad_acpi" "fbcon" "i915"];
boot.kernelParams = ["quiet" "acpi_osi=\"!Windows 2012\""];
boot.extraModulePackages = [config.boot.kernelPackages.tp_smapi];
boot.extraModprobeConfig = ''
options i915 enable_rc6=1
'';
networking.hostName = "aji";
fileSystems."/" = {
mountPoint = "/";
device = "/dev/mapper/cryptvg-root";
fsType = "btrfs";
options = ["subvol=aji-root" "discard" "compress=lzo"];
};
swapDevices =
[ { device = "/dev/mapper/cryptvg-swap"; }
];
services.tlp.enable = true;
services.tlp.extraConfig = ''
# Needed for either SSD or btrfs.
SATA_LINKPWR_ON_BAT=max_performance
'';
services.xserver.xkbModel = "thinkpad60";
# The NixOS release to be compatible with for stateful data such as databases.
system.stateVersion = "16.03";
}
|