-
Notifications
You must be signed in to change notification settings - Fork 3
/
configuration.nix
97 lines (82 loc) · 2.4 KB
/
configuration.nix
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{ config, pkgs, nixos-hardware, home-manager, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
nixos-hardware.nixosModules.lenovo-thinkpad-t480s
home-manager.nixosModules.home-manager
../../modules/home-manager.nix
../../modules/nix.nix
../../modules/nixpkgs.nix
../../modules/networking.nix
../../modules/basics.nix
../../modules/locales.nix
../../modules/workstation.nix
../../modules/graphical.nix
../../modules/laptop.nix
../../modules/users.nix
../../modules/security.nix
../../modules/work/iohk/binary-cache.nix
../../modules/cachix.nix
../../modules/nixbuild.nix
../../modules/zwrk.nix
];
hardware = {
trackpoint.emulateWheel = true;
bluetooth.enable = true;
pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
# Reload the module-bluetooth-policy module with auto_switch=2,
# which makes it switch to the headset policy when an audio input
# stream appears.
extraConfig = ''
unload-module module-bluetooth-policy
load-module module-bluetooth-policy auto_switch=2
load-module module-switch-on-connect
'';
};
opengl.driSupport32Bit = true;
enableRedistributableFirmware = true;
};
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
# I don't really care about these issues on my laptop
kernelParams = [ "mitigations=off" ];
# 5.15 is LTS now
kernelPackages = pkgs.linuxKernel.packages.linux_5_15;
};
services = {
fstrim.enable = true;
xserver.libinput = {
enable = true;
touchpad = {
disableWhileTyping = true;
};
mouse = {
# Get scrolling when holding down the fn button on the elecom mouse
scrollButton = 11;
scrollMethod = "button";
};
};
fwupd.enable = true;
# override nixos-hardware profile
throttled.enable = false;
thermald.enable = true;
};
# zfs
boot.supportedFilesystems = [ "zfs" ];
services.zfs.autoScrub.enable = true;
networking = {
hostName = "clipper";
hostId = "635f8603";
};
system.stateVersion = "20.03";
# TODO: move to nixos-hardware
services.tlp.settings = {
START_CHARGE_THRESH_BAT0 = 75;
STOP_CHARGE_THRESH_BAT0 = 80;
};
}