nixpkgs/nixos/modules/services/hardware/pommed.nix
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00

51 lines
1.2 KiB
Nix

{ config, lib, pkgs, ... }:
with lib;
let cfg = config.services.hardware.pommed;
defaultConf = "${pkgs.pommed_light}/etc/pommed.conf.mactel";
in {
options = {
services.hardware.pommed = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to use the pommed tool to handle Apple laptop
keyboard hotkeys.
'';
};
configFile = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
The path to the {file}`pommed.conf` file. Leave
to null to use the default config file
({file}`/etc/pommed.conf.mactel`). See the
files {file}`/etc/pommed.conf.mactel` and
{file}`/etc/pommed.conf.pmac` for examples to
build on.
'';
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.polkit pkgs.pommed_light ];
environment.etc."pommed.conf".source =
if cfg.configFile == null then defaultConf else cfg.configFile;
systemd.services.pommed = {
description = "Pommed Apple Hotkeys Daemon";
wantedBy = [ "multi-user.target" ];
script = "${pkgs.pommed_light}/bin/pommed -f";
};
};
}