diff options
author | tv <tv@krebsco.de> | 2018-11-27 11:47:54 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2018-11-27 11:47:54 +0100 |
commit | c4fabb0bc40e270f7d34a06115b121ef879fc2d1 (patch) | |
tree | d745b162ca3fed36057a1d6aa7d4b4b591d76107 /makefu/2configs/nginx/download.binaergewitter.de.nix | |
parent | 09144f173677ed33850e484cf46876d13bb37c9e (diff) | |
parent | eef1d7877defd7c310dc20f62bf96c7b8f408044 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu/2configs/nginx/download.binaergewitter.de.nix')
-rw-r--r-- | makefu/2configs/nginx/download.binaergewitter.de.nix | 25 |
1 files changed, 25 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; + ''; + }; + }; +} |