summaryrefslogtreecommitdiff
path: root/hostnix/elmo/web.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hostnix/elmo/web.nix')
-rw-r--r--hostnix/elmo/web.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/hostnix/elmo/web.nix b/hostnix/elmo/web.nix
new file mode 100644
index 0000000..67a965b
--- /dev/null
+++ b/hostnix/elmo/web.nix
@@ -0,0 +1,34 @@
+{ ... }:
+
+# TODO serve /srv behind authentication
+
+{
+ # Assumes proper permissions set by syncthing.nix
+ systemd.tmpfiles.rules = [
+ "L /home/joe/Public - - - - /srv/syncthing/Public/"
+ ];
+
+ services.nginx = {
+ enable = true;
+ recommendedGzipSettings = true;
+ recommendedOptimisation = true;
+ recommendedProxySettings = true;
+ recommendedTlsSettings = true;
+ virtualHosts."elmo.mou.fo" = {
+ default = true;
+ enableACME = true;
+ forceSSL = true;
+ root = "/var/www";
+ locations = {
+ "/user/".extraConfig = ''
+ charset utf-8;
+ autoindex on;
+ autoindex_exact_size off;
+ autoindex_localtime on;
+ '';
+ };
+ };
+ };
+
+ security.acme.certs."elmo.mou.fo".extraDomainNames = [ "*.elmo.mou.fo" ];
+}