From b8d59765e11e20ff8859c93220454a6a84445c1f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Apr 2014 00:30:12 +0200 Subject: cups: Add a listenAddresses option --- nixos/modules/services/printing/cupsd.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services') diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index edbba7e0a834..d229c610669f 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -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 -- cgit 1.4.1