~ruther/nixos-config

ref: 6904cf1761334d033556f106c82d79b48e6657f4 nixos-config/home/laptop.nix -rw-r--r-- 557 bytes
6904cf17 — Frantisek Bohacek refactor: modularize the configuration 1 year, 1 day ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ config, lib, pkgs, ... }:

{
  config = lib.mkIf config.nixos-config.isLaptop {
    home.packages = [
      pkgs.acpi
    ];

    services.cbatticon = {
      enable = true;
      criticalLevelPercent = 10;
      lowLevelPercent = 20;
    };

    # TODO put to qtile under if isLaptop
    systemd.user.services.cbatticon = lib.mkIf config.services.cbatticon.enable {
      Unit = {
        After = lib.mkForce [];
        PartOf = lib.mkForce [ "wm-services.target" ];
      };
      Install.WantedBy = lib.mkForce [ "wm-services.target" ];
    };
  };
}
Do not follow this link