mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 04:02:10 +00:00
adding http_address option to varnish service
This commit is contained in:
parent
7b6e26b380
commit
c95d830839
|
@ -1,6 +1,7 @@
|
|||
{ config, pkgs, ...}:
|
||||
let
|
||||
cfg = config.services.varnish;
|
||||
|
||||
in
|
||||
with pkgs.lib;
|
||||
{
|
||||
|
@ -13,6 +14,13 @@ with pkgs.lib;
|
|||
";
|
||||
};
|
||||
|
||||
http_address = mkOption {
|
||||
default = "*:6081";
|
||||
description = "
|
||||
HTTP listen address and port.
|
||||
";
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
description = "
|
||||
Verbatim default.vcl configuration.
|
||||
|
@ -39,7 +47,7 @@ with pkgs.lib;
|
|||
chown -R varnish:varnish ${cfg.stateDir}
|
||||
'';
|
||||
path = [ pkgs.gcc ];
|
||||
serviceConfig.ExecStart = "${pkgs.varnish}/sbin/varnishd -f ${pkgs.writeText "default.vcl" cfg.config} -n ${cfg.stateDir} -u varnish";
|
||||
serviceConfig.ExecStart = "${pkgs.varnish}/sbin/varnishd -a ${cfg.http_address} -f ${pkgs.writeText "default.vcl" cfg.config} -n ${cfg.stateDir} -u varnish";
|
||||
serviceConfig.Type = "forking";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue