forked from mirrors/nixpkgs
cups: Add defaultShared, browsing and webInterace config option
This commit is contained in:
parent
65e2b83b36
commit
6f69dd46d7
2 changed files with 30 additions and 1 deletions
|
@ -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 {
|
cupsdConf = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
@ -259,7 +283,11 @@ in
|
||||||
|
|
||||||
SetEnv PATH ${bindir}/lib/cups/filter:${bindir}/bin:${bindir}/sbin
|
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
|
DefaultAuthType Basic
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import ./make-test.nix ({pkgs, ... }: {
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{ services.printing.enable = true;
|
{ services.printing.enable = true;
|
||||||
services.printing.listenAddresses = [ "*:631" ];
|
services.printing.listenAddresses = [ "*:631" ];
|
||||||
|
services.printing.defaultShared = true;
|
||||||
services.printing.extraConf =
|
services.printing.extraConf =
|
||||||
''
|
''
|
||||||
<Location />
|
<Location />
|
||||||
|
|
Loading…
Add table
Reference in a new issue