Merge pull request #156685 from schnusch/squid

nixos/squid: add services.squid.proxyAddress
This commit is contained in:
Pascal Bach 2022-02-16 19:42:47 +01:00 committed by GitHub
commit 4c999b91a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,7 +81,9 @@ let
http_access deny all
# Squid normally listens to port 3128
http_port ${toString cfg.proxyPort}
http_port ${
optionalString (cfg.proxyAddress != null) "${cfg.proxyAddress}:"
}${toString cfg.proxyPort}
# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid
@ -109,6 +111,12 @@ in
description = "Whether to run squid web proxy.";
};
proxyAddress = mkOption {
type = types.nullOr types.str;
default = null;
description = "IP address on which squid will listen.";
};
proxyPort = mkOption {
type = types.int;
default = 3128;