cups: Add defaultShared, browsing and webInterace config option
This commit is contained in:
parent
55a6469ba3
commit
2cc8d15653
@ -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
|
||||
|
||||
|
@ -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 />
|
||||
|
Loading…
Reference in New Issue
Block a user