cups: Add a listenAddresses option

This commit is contained in:
Eelco Dolstra 2014-04-25 00:30:12 +02:00
parent cd05320716
commit b8d59765e1
2 changed files with 13 additions and 2 deletions

View File

@ -56,6 +56,15 @@ in
'';
};
listenAddresses = mkOption {
type = types.listOf types.str;
default = [ "127.0.0.1:631" ];
example = [ "*:631" ];
description = ''
A list of addresses and ports on which to listen.
'';
};
bindirCmds = mkOption {
type = types.lines;
internal = true;
@ -154,7 +163,9 @@ in
SystemGroup root wheel
Listen localhost:631
${concatMapStrings (addr: ''
Listen ${addr}
'') cfg.listenAddresses}
Listen /var/run/cups/cups.sock
# Note: we can't use ${cups}/etc/cups as the ServerRoot, since

View File

@ -7,9 +7,9 @@ import ./make-test.nix ({pkgs, ... }: {
server =
{ config, pkgs, ... }:
{ services.printing.enable = true;
services.printing.listenAddresses = [ "*:631" ];
services.printing.cupsdConf =
''
Listen server:631
<Location />
Order allow,deny
Allow from all