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 {
|
||||
type = types.lines;
|
||||
internal = true;
|
||||
|
@ -403,19 +413,19 @@ in
|
|||
|
||||
<Location />
|
||||
Order allow,deny
|
||||
Allow localhost
|
||||
${cfg.allowFrom}
|
||||
</Location>
|
||||
|
||||
<Location /admin>
|
||||
Order allow,deny
|
||||
Allow localhost
|
||||
${cfg.allowFrom}
|
||||
</Location>
|
||||
|
||||
<Location /admin/conf>
|
||||
AuthType Basic
|
||||
Require user @SYSTEM
|
||||
Order allow,deny
|
||||
Allow localhost
|
||||
${cfg.allowFrom}
|
||||
</Location>
|
||||
|
||||
<Policy default>
|
||||
|
|
Loading…
Reference in New Issue