diff options
author | schnusch <schnusch@users.noreply.github.com> | 2022-01-25 03:01:27 +0100 |
---|---|---|
committer | schnusch <schnusch@users.noreply.github.com> | 2022-01-25 03:01:27 +0100 |
commit | 711112516037fa45f564971e7d26febbf3f34dbc (patch) | |
tree | b5fb66f97392d8cb267bbbfa43784455f31ec7b3 /nixos | |
parent | 307a99bb01ed30f5a3c690c0b1f5fc3204d269ce (diff) | |
download | nixpkgs-711112516037fa45f564971e7d26febbf3f34dbc.tar nixpkgs-711112516037fa45f564971e7d26febbf3f34dbc.tar.gz nixpkgs-711112516037fa45f564971e7d26febbf3f34dbc.tar.bz2 nixpkgs-711112516037fa45f564971e7d26febbf3f34dbc.tar.lz nixpkgs-711112516037fa45f564971e7d26febbf3f34dbc.tar.xz nixpkgs-711112516037fa45f564971e7d26febbf3f34dbc.tar.zst nixpkgs-711112516037fa45f564971e7d26febbf3f34dbc.zip |
nixos/squid: add services.squid.proxyAddress
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/squid.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/squid.nix b/nixos/modules/services/networking/squid.nix index 9d063b92aa1..4f3881af8bb 100644 --- a/nixos/modules/services/networking/squid.nix +++ b/nixos/modules/services/networking/squid.nix @@ -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; |