diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-09-18 16:12:36 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-09-18 16:21:26 +0200 |
commit | ec4f38c56f0a7dfc9b2f9db111250f925e009c7d (patch) | |
tree | 5f630b316479985d695395f606624feb7d2be011 /nixos/modules/services/hardware/pommed.nix | |
parent | 72c2898e74fd868c5cb4f3cbada8ba5701e3a6ae (diff) | |
download | nixpkgs-ec4f38c56f0a7dfc9b2f9db111250f925e009c7d.tar nixpkgs-ec4f38c56f0a7dfc9b2f9db111250f925e009c7d.tar.gz nixpkgs-ec4f38c56f0a7dfc9b2f9db111250f925e009c7d.tar.bz2 nixpkgs-ec4f38c56f0a7dfc9b2f9db111250f925e009c7d.tar.lz nixpkgs-ec4f38c56f0a7dfc9b2f9db111250f925e009c7d.tar.xz nixpkgs-ec4f38c56f0a7dfc9b2f9db111250f925e009c7d.tar.zst nixpkgs-ec4f38c56f0a7dfc9b2f9db111250f925e009c7d.zip |
Manual: Remove some option defaults that refer to store paths
Option defaults should not refer to store paths, because they cause the manual to be rebuilt gratuitously. It's especially bad to refer to a highly variable path like a computed configuration file.
Diffstat (limited to 'nixos/modules/services/hardware/pommed.nix')
-rw-r--r-- | nixos/modules/services/hardware/pommed.nix | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/nixos/modules/services/hardware/pommed.nix b/nixos/modules/services/hardware/pommed.nix index 04db46999b0..a24557b40ba 100644 --- a/nixos/modules/services/hardware/pommed.nix +++ b/nixos/modules/services/hardware/pommed.nix @@ -4,30 +4,34 @@ with lib; { - options.services.hardware.pommed = { - enable = mkOption { - default = false; - description = '' - Whether to use the pommed tool to handle Apple laptop keyboard hotkeys. - ''; + 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.path; + description = '' + The path to the <filename>pommed.conf</filename> file. + ''; + }; }; - configFile = mkOption { - default = "${pkgs.pommed}/etc/pommed.conf"; - description = '' - The contents of the pommed.conf file. - ''; - }; }; config = mkIf config.services.hardware.pommed.enable { environment.systemPackages = [ pkgs.polkit ]; - environment.etc = [ - { source = config.services.hardware.pommed.configFile; - target = "pommed.conf"; - } - ]; + environment.etc."pommed.conf".source = config.services.hardware.pommed.configFile; + + services.hardware.pommed.configFile = "${pkgs.pommed}/etc/pommed.conf"; services.dbus.packages = [ pkgs.pommed ]; |