Merge pull request #86013 from Ma27/cups-allow-from
nixos/printing: make access to web-interface configurable
This commit is contained in:
commit
1f6d33ef26
@ -153,6 +153,16 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
allowFrom = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ "localhost" ];
|
||||||
|
example = [ "all" ];
|
||||||
|
apply = concatMapStringsSep "\n" (x: "Allow ${x}");
|
||||||
|
description = ''
|
||||||
|
From which hosts to allow unconditional access.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
bindirCmds = mkOption {
|
bindirCmds = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
internal = true;
|
internal = true;
|
||||||
@ -403,19 +413,19 @@ in
|
|||||||
|
|
||||||
<Location />
|
<Location />
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow localhost
|
${cfg.allowFrom}
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
<Location /admin>
|
<Location /admin>
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow localhost
|
${cfg.allowFrom}
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
<Location /admin/conf>
|
<Location /admin/conf>
|
||||||
AuthType Basic
|
AuthType Basic
|
||||||
Require user @SYSTEM
|
Require user @SYSTEM
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow localhost
|
${cfg.allowFrom}
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
<Policy default>
|
<Policy default>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user