summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/nginx
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-12-04 19:27:27 +0100
committerjeschli <jeschli@gmail.com>2018-12-04 19:27:27 +0100
commit5030b74cc5c578bb82619a24592504a6008f1a10 (patch)
tree0551e3ddb94353b7438bec02174bf3379bc89b87 /makefu/2configs/nginx
parent78b289201987675844aa37abeb4279eb4051ebe0 (diff)
parent82988de84c177c247ebbe80940c4d50b9f073b4e (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'makefu/2configs/nginx')
-rw-r--r--makefu/2configs/nginx/download.binaergewitter.de.nix25
-rw-r--r--makefu/2configs/nginx/euer.blog.nix1
-rw-r--r--makefu/2configs/nginx/euer.wiki.nix1
3 files changed, 27 insertions, 0 deletions
diff --git a/makefu/2configs/nginx/download.binaergewitter.de.nix b/makefu/2configs/nginx/download.binaergewitter.de.nix
new file mode 100644
index 000000000..6b5687e72
--- /dev/null
+++ b/makefu/2configs/nginx/download.binaergewitter.de.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, ... }:
+
+let
+ ident = (toString <secrets>) + "/mirrorsync.gum.id_ed25519";
+in {
+ systemd.services.mirrorsync = {
+ startAt = "08:00:00";
+ path = with pkgs; [ rsync openssh ];
+ script = ''rsync -av -e "ssh -i ${ident}" mirrorsync@159.69.132.234:/var/www/html/ /var/www/binaergewitter'';
+ };
+ services.nginx = {
+ enable = lib.mkDefault true;
+ recommendedGzipSettings = true;
+ recommendedOptimisation = true;
+ virtualHosts."download.binaergewitter.de" = {
+ serverAliases = [ "dl2.binaergewitter.de" ];
+ root = "/var/www/binaergewitter";
+ extraConfig = ''
+ access_log /var/spool/nginx/logs/binaergewitter.access.log combined;
+ error_log /var/spool/nginx/logs/binaergewitter.error.log error;
+ autoindex on;
+ '';
+ };
+ };
+}
diff --git a/makefu/2configs/nginx/euer.blog.nix b/makefu/2configs/nginx/euer.blog.nix
index 65d36d9b6..14d1285db 100644
--- a/makefu/2configs/nginx/euer.blog.nix
+++ b/makefu/2configs/nginx/euer.blog.nix
@@ -39,4 +39,5 @@ in {
};
};
};
+ state = [ base-dir ];
}
diff --git a/makefu/2configs/nginx/euer.wiki.nix b/makefu/2configs/nginx/euer.wiki.nix
index 99533b25c..280622259 100644
--- a/makefu/2configs/nginx/euer.wiki.nix
+++ b/makefu/2configs/nginx/euer.wiki.nix
@@ -21,6 +21,7 @@ let
tw-pass-file = "${sec}/tw-pass.ini";
in {
+ state = [ base-dir ];
services.phpfpm = {
# phpfpm does not have an enable option
poolConfigs = {