nixos/cupsd: Introduce services.printing.logLevel option
Previously we indirectly suggested that the user use
services.printing.extraConf to set this, but this doesn't work with the
default merge ordering. Fix this by making it an independent option.
Fixes #39611.
commit192352ff2f9a736f959a569a74cd42fcdb29021c
authorBen Gamari <ben@smart-cactus.org>
dateFri 27 Apr 2018, 16:34 (9 years ago)
parentbea11a3
nixos/modules/services/printing/cupsd.nix+12−3
@@ -83,6 +83,8 @@ let
8383
8484 WebInterface ${if cfg.webInterface then "Yes" else "No"}
8585
86+ LogLevel ${cfg.logLevel}
87+
8688 ${cfg.extraConf}
8789 '';
8890
@@ -165,6 +167,15 @@ in
165167 '';
166168 };
167169
170+ logLevel = mkOption {
171+ type = types.str;
172+ default = "info";
173+ example = "debug";
174+ description = ''
175+ Specifies the cupsd logging verbosity.
176+ '';
177+ };
178+
168179 extraFilesConf = mkOption {
169180 type = types.lines;
170181 default = "";
@@ -180,7 +191,7 @@ in
180191 example =
181192 ''
182193 BrowsePoll cups.example.com
183− LogLevel debug
194+ MaxCopies 42
184195 '';
185196 description = ''
186197 Extra contents of the configuration file of the CUPS daemon
@@ -345,8 +356,6 @@ in
345356
346357 services.printing.extraConf =
347358 ''
348− LogLevel info
349−
350359 DefaultAuthType Basic
351360
352361 <Location />