1 { config, lib, pkgs, ... }:
5 let cfg = config.services.hardware.pommed;
6 defaultConf = "${pkgs.pommed_light}/etc/pommed.conf.mactel";
11 services.hardware.pommed = {
16 description = lib.mdDoc ''
17 Whether to use the pommed tool to handle Apple laptop
22 configFile = mkOption {
23 type = types.nullOr types.path;
25 description = lib.mdDoc ''
26 The path to the {file}`pommed.conf` file. Leave
27 to null to use the default config file
28 ({file}`/etc/pommed.conf.mactel`). See the
29 files {file}`/etc/pommed.conf.mactel` and
30 {file}`/etc/pommed.conf.pmac` for examples to
38 config = mkIf cfg.enable {
39 environment.systemPackages = [ pkgs.polkit pkgs.pommed_light ];
41 environment.etc."pommed.conf".source =
42 if cfg.configFile == null then defaultConf else cfg.configFile;
44 systemd.services.pommed = {
45 description = "Pommed Apple Hotkeys Daemon";
46 wantedBy = [ "multi-user.target" ];
47 script = "${pkgs.pommed_light}/bin/pommed -f";