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.

Changed files
+30 -20
nixos
modules
config
services
hardware
x11
display-managers
+3 -2
nixos/modules/config/pulseaudio.nix
···
};
configFile = mkOption {
-
type = types.uniq types.path;
-
default = "${cfg.package}/etc/pulse/default.pa";
+
type = types.path;
description = ''
The path to the configuration the PulseAudio server
should use. By default, the "default.pa" configuration
···
target = "pulse/client.conf";
source = clientConf;
};
+
+
hardware.pulseaudio.configFile = mkDefault "${cfg.package}/etc/pulse/default.pa";
}
(mkIf cfg.enable {
+21 -17
nixos/modules/services/hardware/pommed.nix
···
{
-
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 = {
-
configFile = mkOption {
-
default = "${pkgs.pommed}/etc/pommed.conf";
-
description = ''
-
The contents of the pommed.conf file.
-
'';
+
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.
+
'';
+
};
};
+
};
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 ];
+6 -1
nixos/modules/services/x11/display-managers/default.nix
···
xserverBin = mkOption {
type = types.path;
-
default = "${xorg.xorgserver}/bin/X";
description = "Path to the X server used by display managers.";
};
···
};
};
+
+
};
+
+
config = {
+
+
services.xserver.displayManager.xserverBin = "${xorg.xorgserver}/bin/X";
};