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 ''; 73 }; 74 75 cupsdConf = mkOption { 76 type = types.lines; 77 default = ""; ··· 259 260 SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin 261 262 - Browsing On 263 264 DefaultAuthType Basic 265
··· 72 ''; 73 }; 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 + 99 cupsdConf = mkOption { 100 type = types.lines; 101 default = ""; ··· 283 284 SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin 285 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"} 291 292 DefaultAuthType Basic 293
+1
nixos/tests/printing.nix
··· 9 { config, pkgs, ... }: 10 { services.printing.enable = true; 11 services.printing.listenAddresses = [ "*:631" ]; 12 services.printing.extraConf = 13 '' 14 <Location />
··· 9 { config, pkgs, ... }: 10 { services.printing.enable = true; 11 services.printing.listenAddresses = [ "*:631" ]; 12 + services.printing.defaultShared = true; 13 services.printing.extraConf = 14 '' 15 <Location />