summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/bgt/download.binaergewitter.de.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-12-14 19:24:26 +0100
committerlassulus <lassulus@lassul.us>2018-12-14 19:24:26 +0100
commit9a9a6d0a90072890b8946266abff1d98647c52fc (patch)
tree7b541f19ce2e5455d3ab9e2d546790c60439c07e /makefu/2configs/bgt/download.binaergewitter.de.nix
parenta56497f72ce37b08b49e9a1f86f3b8ddad8ad119 (diff)
parentce60c288e588d8968535399921e6735cc05acef1 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/bgt/download.binaergewitter.de.nix')
-rw-r--r--makefu/2configs/bgt/download.binaergewitter.de.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/makefu/2configs/bgt/download.binaergewitter.de.nix b/makefu/2configs/bgt/download.binaergewitter.de.nix
new file mode 100644
index 000000000..6d64848f5
--- /dev/null
+++ b/makefu/2configs/bgt/download.binaergewitter.de.nix
@@ -0,0 +1,38 @@
+{ config, lib, pkgs, ... }:
+
+with import <stockholm/lib>;
+let
+ ident = (builtins.readFile ./auphonic.pub);
+in {
+ services.openssh = {
+ allowSFTP = true;
+ sftpFlags = [ "-l VERBOSE" ];
+ extraConfig = ''
+ Match User auphonic
+ ForceCommand internal-sftp
+ AllowTcpForwarding no
+ X11Forwarding no
+ PasswordAuthentication no
+ '';
+ };
+ users.users.auphonic = {
+ uid = genid "auphonic";
+ group = "nginx";
+ useDefaultShell = true;
+ openssh.authorizedKeys.keys = [ ident config.krebs.users.makefu.pubkey ];
+ };
+ 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;
+ '';
+ };
+ };
+}