forked from mirrors/nixpkgs
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.
This commit is contained in:
parent
72c2898e74
commit
ec4f38c56f
|
@ -71,8 +71,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
configFile = mkOption {
|
configFile = mkOption {
|
||||||
type = types.uniq types.path;
|
type = types.path;
|
||||||
default = "${cfg.package}/etc/pulse/default.pa";
|
|
||||||
description = ''
|
description = ''
|
||||||
The path to the configuration the PulseAudio server
|
The path to the configuration the PulseAudio server
|
||||||
should use. By default, the "default.pa" configuration
|
should use. By default, the "default.pa" configuration
|
||||||
|
@ -112,6 +111,8 @@ in {
|
||||||
target = "pulse/client.conf";
|
target = "pulse/client.conf";
|
||||||
source = clientConf;
|
source = clientConf;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.pulseaudio.configFile = mkDefault "${cfg.package}/etc/pulse/default.pa";
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf cfg.enable {
|
(mkIf cfg.enable {
|
||||||
|
|
|
@ -4,30 +4,34 @@ with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
options.services.hardware.pommed = {
|
options = {
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
services.hardware.pommed = {
|
||||||
description = ''
|
|
||||||
Whether to use the pommed tool to handle Apple laptop keyboard hotkeys.
|
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 {
|
config = mkIf config.services.hardware.pommed.enable {
|
||||||
environment.systemPackages = [ pkgs.polkit ];
|
environment.systemPackages = [ pkgs.polkit ];
|
||||||
|
|
||||||
environment.etc = [
|
environment.etc."pommed.conf".source = config.services.hardware.pommed.configFile;
|
||||||
{ source = config.services.hardware.pommed.configFile;
|
|
||||||
target = "pommed.conf";
|
services.hardware.pommed.configFile = "${pkgs.pommed}/etc/pommed.conf";
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.pommed ];
|
services.dbus.packages = [ pkgs.pommed ];
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,6 @@ in
|
||||||
|
|
||||||
xserverBin = mkOption {
|
xserverBin = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = "${xorg.xorgserver}/bin/X";
|
|
||||||
description = "Path to the X server used by display managers.";
|
description = "Path to the X server used by display managers.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -280,4 +279,10 @@ in
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
services.xserver.displayManager.xserverBin = "${xorg.xorgserver}/bin/X";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue