cups: Add defaultShared, browsing and webInterace config option

This commit is contained in:
Jascha Geerds 2015-05-04 22:32:35 +02:00 committed by Domen Kožar
parent 55a6469ba3
commit 2cc8d15653
2 changed files with 30 additions and 1 deletions

View File

@ -72,6 +72,30 @@ in
'';
};
defaultShared = mkOption {
type = types.bool;
default = false;
description = ''
Specifies whether local printers are shared by default.
'';
};
browsing = mkOption {
type = types.bool;
default = false;
description = ''
Specifies whether shared printers are advertised.
'';
};
webInterface = mkOption {
type = types.bool;
default = true;
description = ''
Specifies whether the web interface is enabled.
'';
};
cupsdConf = mkOption {
type = types.lines;
default = "";
@ -259,7 +283,11 @@ in
SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin
Browsing On
DefaultShared ${if cfg.defaultShared then "Yes" else "No"}
Browsing ${if cfg.browsing then "Yes" else "No"}
WebInterface ${if cfg.webInterface then "Yes" else "No"}
DefaultAuthType Basic

View File

@ -9,6 +9,7 @@ import ./make-test.nix ({pkgs, ... }: {
{ config, pkgs, ... }:
{ services.printing.enable = true;
services.printing.listenAddresses = [ "*:631" ];
services.printing.defaultShared = true;
services.printing.extraConf =
''
<Location />