aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/printing/cupsd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/printing/cupsd.nix')
-rw-r--r--nixpkgs/nixos/modules/services/printing/cupsd.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/nixpkgs/nixos/modules/services/printing/cupsd.nix b/nixpkgs/nixos/modules/services/printing/cupsd.nix
index 59306d625e6..e67badfcd29 100644
--- a/nixpkgs/nixos/modules/services/printing/cupsd.nix
+++ b/nixpkgs/nixos/modules/services/printing/cupsd.nix
@@ -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>