summaryrefslogtreecommitdiffstats
path: root/tv/2configs/nginx
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-12-23 09:46:32 +0100
committertv <tv@krebsco.de>2016-12-23 09:47:31 +0100
commit7a3e08e967da0452c76ffc10d1f6c476718c77df (patch)
tree3d5da18ec390c24fc3d21d648f4fbf2e9f481f67 /tv/2configs/nginx
parente80054feaded04a35d991fdef7decf42e3f0fc66 (diff)
tv: replace krebs.nginx by services.nginx.virtualHosts
Diffstat (limited to 'tv/2configs/nginx')
-rw-r--r--tv/2configs/nginx/default.nix12
-rw-r--r--tv/2configs/nginx/public_html.nix14
2 files changed, 12 insertions, 14 deletions
diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix
index 39995c052..277f459f0 100644
--- a/tv/2configs/nginx/default.nix
+++ b/tv/2configs/nginx/default.nix
@@ -3,15 +3,15 @@
with import <stockholm/lib>;
{
- krebs.nginx = {
- servers.default.locations = [
- (nameValuePair "= /etc/os-release" ''
+ services.nginx = {
+ virtualHosts.default = {
+ locations."= /etc/os-release".extraConfig = ''
default_type text/plain;
alias /etc/os-release;
- '')
- ];
+ '';
+ };
};
- tv.iptables = optionalAttrs config.krebs.nginx.enable {
+ tv.iptables = {
input-retiolum-accept-tcp = singleton "http";
};
}
diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix
index 4c74d2250..9744da1e8 100644
--- a/tv/2configs/nginx/public_html.nix
+++ b/tv/2configs/nginx/public_html.nix
@@ -3,20 +3,18 @@
with import <stockholm/lib>;
{
- krebs.nginx = {
+ services.nginx = {
enable = true;
- servers.default = {
- server-names = [
+ virtualHosts.default = {
+ serverAliases = [
"localhost"
"${config.krebs.build.host.name}"
"${config.krebs.build.host.name}.r"
"${config.krebs.build.host.name}.retiolum"
];
- locations = [
- (nameValuePair "~ ^/~(.+?)(/.*)?\$" ''
- alias /home/$1/public_html$2;
- '')
- ];
+ locations."~ ^/~(.+?)(/.*)?\$".extraConfig = ''
+ alias /home/$1/public_html$2;
+ '';
};
};
tv.iptables.input-internet-accept-tcp = singleton "http";