summaryrefslogtreecommitdiff
path: root/sys/hardware/laptop.nix
blob: 312396036d212458d70c9d93c55beb99c89cfb42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  config,
  lib,
  ...
}:
with lib; let
  cfg = config.local.hardware.laptop;
in {
  options.local.hardware.laptop = {
    enable = mkEnableOption "laptop stuff";
  };

  config = mkIf cfg.enable {
    local.boot.impermanence.directories = [
      "/var/lib/upower"
    ];

    services = {
      tlp.enable = true;
      upower.enable = true;
    };
  };
}