1 { config, lib, pkgs, ... }:
2 let cfg = config.services.hardware.pommed;
3 defaultConf = "${pkgs.pommed_light}/etc/pommed.conf.mactel";
8 services.hardware.pommed = {
10 enable = lib.mkOption {
11 type = lib.types.bool;
14 Whether to use the pommed tool to handle Apple laptop
19 configFile = lib.mkOption {
20 type = lib.types.nullOr lib.types.path;
23 The path to the {file}`pommed.conf` file. Leave
24 to null to use the default config file
25 ({file}`/etc/pommed.conf.mactel`). See the
26 files {file}`/etc/pommed.conf.mactel` and
27 {file}`/etc/pommed.conf.pmac` for examples to
35 config = lib.mkIf cfg.enable {
36 environment.systemPackages = [ pkgs.polkit pkgs.pommed_light ];
38 environment.etc."pommed.conf".source =
39 if cfg.configFile == null then defaultConf else cfg.configFile;
41 systemd.services.pommed = {
42 description = "Pommed Apple Hotkeys Daemon";
43 wantedBy = [ "multi-user.target" ];
44 script = "${pkgs.pommed_light}/bin/pommed -f";