pommed service: use pommed-light

The pommed package was marked as broken. It is also severely
unmaintained. I therefore chose to replace it entirely with
`pommed-light`, for now.

authored by

Balletie and committed by
Joachim Fasting
e5f5aa52 66c745e3

+19 -17
+19 -17
nixos/modules/services/hardware/pommed.nix
··· 2 3 with lib; 4 5 - { 6 7 options = { 8 ··· 12 type = types.bool; 13 default = false; 14 description = '' 15 - Whether to use the pommed tool to handle Apple laptop keyboard hotkeys. 16 ''; 17 }; 18 19 configFile = mkOption { 20 - type = types.path; 21 description = '' 22 - The path to the <filename>pommed.conf</filename> file. 23 ''; 24 }; 25 }; 26 27 }; 28 29 - config = mkIf config.services.hardware.pommed.enable { 30 - environment.systemPackages = [ pkgs.polkit ]; 31 32 - environment.etc."pommed.conf".source = config.services.hardware.pommed.configFile; 33 - 34 - services.hardware.pommed.configFile = "${pkgs.pommed}/etc/pommed.conf"; 35 - 36 - services.dbus.packages = [ pkgs.pommed ]; 37 38 systemd.services.pommed = { 39 - description = "Pommed hotkey management"; 40 wantedBy = [ "multi-user.target" ]; 41 - after = [ "dbus.service" ]; 42 - postStop = "rm -f /var/run/pommed.pid"; 43 - script = "${pkgs.pommed}/bin/pommed"; 44 - serviceConfig.Type = "forking"; 45 - path = [ pkgs.eject ]; 46 }; 47 }; 48 }
··· 2 3 with lib; 4 5 + let cfg = config.services.hardware.pommed; 6 + defaultConf = "${pkgs.pommed_light}/etc/pommed.conf.mactel"; 7 + in { 8 9 options = { 10 ··· 14 type = types.bool; 15 default = false; 16 description = '' 17 + Whether to use the pommed tool to handle Apple laptop 18 + keyboard hotkeys. 19 ''; 20 }; 21 22 configFile = mkOption { 23 + type = types.nullOr types.path; 24 + default = null; 25 description = '' 26 + The path to the <filename>pommed.conf</filename> file. Leave 27 + to null to use the default config file 28 + (<filename>/etc/pommed.conf.mactel</filename>). See the 29 + files <filename>/etc/pommed.conf.mactel</filename> and 30 + <filename>/etc/pommed.conf.pmac</filename> for examples to 31 + build on. 32 ''; 33 }; 34 }; 35 36 }; 37 38 + config = mkIf cfg.enable { 39 + environment.systemPackages = [ pkgs.polkit pkgs.pommed_light ]; 40 41 + environment.etc."pommed.conf".source = 42 + if cfg.configFile == null then defaultConf else cfg.configFile; 43 44 systemd.services.pommed = { 45 + description = "Pommed Apple Hotkeys Daemon"; 46 wantedBy = [ "multi-user.target" ]; 47 + script = "${pkgs.pommed_light}/bin/pommed -f"; 48 }; 49 }; 50 }