diff options
author | Tristan Helmich <tristan.helmich@gmail.com> | 2017-01-03 22:58:37 +0100 |
---|---|---|
committer | Tristan Helmich <tristan.helmich@gmail.com> | 2017-01-03 23:10:54 +0100 |
commit | b5703eaa802d3775d86cdaaf0057fcd7acc798f9 (patch) | |
tree | 533c1953236330b9aebefa93c5aa40d643867893 /nixos | |
parent | 663048f37849667f84bb1d941132369eff6e630f (diff) |
smokeping: Allow full override of imgurl + cgiurl
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/smokeping.nix | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/smokeping.nix b/nixos/modules/services/networking/smokeping.nix index 005655f111a1f..9c8dfa7bac4fd 100644 --- a/nixos/modules/services/networking/smokeping.nix +++ b/nixos/modules/services/networking/smokeping.nix @@ -16,11 +16,11 @@ let ${lib.optionalString (cfg.mailHost != "") "mailhost = ${cfg.mailHost}"} ${lib.optionalString (cfg.sendmail != null) "sendmail = ${cfg.sendmail}"} imgcache = ${smokepingHome}/cache - imgurl = http://${cfg.hostName}:${builtins.toString cfg.port}/cache + imgurl = ${cfg.imgUrl} datadir = ${smokepingHome}/data pagedir = ${smokepingHome}/cache piddir = ${smokepingPidDir} - cgiurl = http://${cfg.hostName}:${builtins.toString cfg.port}/smokeping.cgi + cgiurl = ${cfg.cgiUrl} linkstyle = ${cfg.linkStyle} smokemail = ${cfg.smokeMailTemplate} *** Presentation *** @@ -101,6 +101,18 @@ in example = "somewhere.example.com"; description = "DNS name for the urls generated in the cgi."; }; + cgiUrl = mkOption { + type = types.string; + default = "http://${cfg.hostName}:${builtins.toString cfg.port}/smokeping.cgi"; + example = "https://somewhere.example.com/smokeping.cgi"; + description = "URL to the smokeping cgi."; + }; + imgUrl = mkOption { + type = types.string; + default = "http://${cfg.hostName}:${builtins.toString cfg.port}/cache"; + example = "https://somewhere.example.com/cache"; + description = "Base url for images generated in the cgi."; + }; linkStyle = mkOption { type = types.enum ["original" "absolute" "relative"]; default = "relative"; |