main
1{inputs, ...}: {
2 flake.modules.nixos."hosts/kevin" = {pkgs, ...}: {
3 imports = with inputs.nixos-hardware.nixosModules; [
4 common-pc-laptop
5 common-pc-laptop-ssd
6 ];
7
8 boot.initrd.availableKernelModules = [
9 "xhci_pci"
10 "nvme"
11 "thunderbolt"
12 "usbhid"
13 "sdhci_pci"
14 ];
15
16 # Thunderbolt
17 services.hardware.bolt.enable = true;
18 networking.firewall.trustedInterfaces = ["thunderbolt0"];
19
20 # Bluetooth
21 hardware.bluetooth.enable = true;
22
23 # Fingerprint
24 services.fprintd = {
25 enable = true;
26 tod = {
27 enable = true;
28 driver = pkgs.libfprint-2-tod1-goodix;
29 };
30 };
31 systemd.services.fprintd = {
32 wantedBy = ["multi-user.target"];
33 serviceConfig.Type = "simple";
34 };
35
36 # Lid Settings
37 services.logind.settings.Login = {
38 HandleLidSwitch = "hibernate";
39 HandleLidSwitchExternalPower = "lock";
40 HandleLidSwitchDocked = "ignore";
41 };
42
43 # Cooling management for Intel CPU
44 services.thermald.enable = true;
45 };
46}