stockholm/makefu/2configs/nginx/icecult.nix

27 lines
588 B
Nix
Raw Normal View History

2016-10-19 10:31:13 +00:00
{ config, pkgs, lib, ... }:
2016-10-20 18:54:38 +00:00
with import <stockholm/lib>;
2016-10-19 10:31:13 +00:00
let
icecult = pkgs.fetchFromGitHub {
owner = "kraiz";
repo = "icecult";
rev = "1942d43381a97f30111a48725f7532c343a6f4d7";
sha256 = "0l8q7kw3w1kpvmy8hza9vr5liiycivbljkmwpacaifbay5y98z58";
};
in{
2016-12-24 22:38:01 +00:00
services.nginx = {
2016-10-19 10:31:13 +00:00
enable = true;
2016-12-24 22:38:01 +00:00
virtualHosts.default = {
root = "${icecult}/app";
locations = {
"/rpc".proxyPass = "http://10.42.22.163:3121";
"/rpc".extraConfig = ''
rewrite /rpc/(.*) /$1 break;
proxy_http_version 1.1;
2016-10-19 10:31:13 +00:00
'';
2016-12-24 22:38:01 +00:00
};
2016-10-19 10:31:13 +00:00
};
};
}