mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-17 10:37:45 +03:00
cups: Add a listenAddresses option
This commit is contained in:
parent
cd05320716
commit
b8d59765e1
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user