Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c6518b5aafc9
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1f6d33ef268b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 25, 2020

  1. nixos/printing: make access to web-interface configurable

    Otherwise you'd always get a 403 when hosting the web-interface of cups
    at a different location than `localhost`.
    Ma27 committed Apr 25, 2020
    Copy the full SHA
    4062592 View commit details

Commits on Apr 28, 2020

  1. Merge pull request #86013 from Ma27/cups-allow-from

    nixos/printing: make access to web-interface configurable
    Ma27 authored Apr 28, 2020
    Copy the full SHA
    1f6d33e View commit details
Showing with 13 additions and 3 deletions.
  1. +13 −3 nixos/modules/services/printing/cupsd.nix
16 changes: 13 additions & 3 deletions nixos/modules/services/printing/cupsd.nix
Original file line number Diff line number Diff line change
@@ -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>