summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/nginx/euer.blog.nix
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2016-12-25 12:13:49 +0100
committerlassulus <lass@lassul.us>2016-12-25 12:13:49 +0100
commit9224478adf54f7f65c7e8565c846160b2f0ea467 (patch)
treeca477dd5d011581da0b3796f30c842c9fdddf214 /makefu/2configs/nginx/euer.blog.nix
parent8f16b738c75f25738ca94f146d84c5cc5ec7eaa3 (diff)
parent1eceb8ac46fd1cebbb5091a50359e4863efdaf42 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/nginx/euer.blog.nix')
-rw-r--r--makefu/2configs/nginx/euer.blog.nix29
1 files changed, 8 insertions, 21 deletions
diff --git a/makefu/2configs/nginx/euer.blog.nix b/makefu/2configs/nginx/euer.blog.nix
index b2a965de6..3fb629394 100644
--- a/makefu/2configs/nginx/euer.blog.nix
+++ b/makefu/2configs/nginx/euer.blog.nix
@@ -3,13 +3,9 @@
with import <stockholm/lib>;
let
sec = toString <secrets>;
- ssl_cert = "${sec}/wildcard.krebsco.de.crt";
- ssl_key = "${sec}/wildcard.krebsco.de.key";
hostname = config.krebs.build.host.name;
user = config.services.nginx.user;
group = config.services.nginx.group;
- external-ip = config.krebs.build.host.nets.internet.ip4.addr;
- internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
base-dir = "/var/www/blog.euer";
in {
# Prepare Blog directory
@@ -32,24 +28,15 @@ in {
};
};
- krebs.nginx = {
+ services.nginx = {
enable = mkDefault true;
- servers = {
- euer-blog = {
- listen = [ "${external-ip}:80" "${external-ip}:443 ssl"
- "${internal-ip}:80" "${internal-ip}:443 ssl" ];
- server-names = [ "euer.krebsco.de" "blog.euer.krebsco.de" "blog.${hostname}" ];
- extraConfig = ''
- gzip on;
- gzip_buffers 4 32k;
- gzip_types text/plain application/x-javascript text/css;
- ssl_certificate ${ssl_cert};
- ssl_certificate_key ${ssl_key};
- default_type text/plain;
- '';
- locations = singleton (nameValuePair "/" ''
- root ${base-dir};
- '');
+ virtualHosts = {
+ "euer.krebsco.de" = {
+ #serverAliases = [ "blog.euer.krebsco.de" "blog.${hostname}" ];
+ enableSSL = true;
+ enableACME = true;
+ forceSSL = true;
+ root = base-dir;
};
};
};