cups: Add defaultShared, browsing and webInterace config option

authored by

Jascha Geerds and committed by
Domen Kožar
2cc8d156 55a6469b

+30 -1
+29 -1
nixos/modules/services/printing/cupsd.nix
··· 72 72 ''; 73 73 }; 74 74 75 + defaultShared = mkOption { 76 + type = types.bool; 77 + default = false; 78 + description = '' 79 + Specifies whether local printers are shared by default. 80 + ''; 81 + }; 82 + 83 + browsing = mkOption { 84 + type = types.bool; 85 + default = false; 86 + description = '' 87 + Specifies whether shared printers are advertised. 88 + ''; 89 + }; 90 + 91 + webInterface = mkOption { 92 + type = types.bool; 93 + default = true; 94 + description = '' 95 + Specifies whether the web interface is enabled. 96 + ''; 97 + }; 98 + 75 99 cupsdConf = mkOption { 76 100 type = types.lines; 77 101 default = ""; ··· 259 283 260 284 SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin 261 285 262 - Browsing On 286 + DefaultShared ${if cfg.defaultShared then "Yes" else "No"} 287 + 288 + Browsing ${if cfg.browsing then "Yes" else "No"} 289 + 290 + WebInterface ${if cfg.webInterface then "Yes" else "No"} 263 291 264 292 DefaultAuthType Basic 265 293
+1
nixos/tests/printing.nix
··· 9 9 { config, pkgs, ... }: 10 10 { services.printing.enable = true; 11 11 services.printing.listenAddresses = [ "*:631" ]; 12 + services.printing.defaultShared = true; 12 13 services.printing.extraConf = 13 14 '' 14 15 <Location />