~ruther/nixos-config

nixos-config/home/laptop.nix -rw-r--r-- 557 bytes
65631fe7 — Frantisek Bohacek feat: add support for Guix 7 months 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