From 7bed120d559ea04811c02e6baf9dd662029f78f5 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Wed, 14 Jul 2021 21:27:30 -0400 Subject: get rid of tabs --- config/web-server.nix | 58 +++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/config/web-server.nix b/config/web-server.nix index 47bf4a3..67e5395 100644 --- a/config/web-server.nix +++ b/config/web-server.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, ... }: - let mpd_loc = (import ../data/aliases.nix).services.mpd; - mpdweb_loc = (import ../data/aliases.nix).services.mpdweb; - pjournal_loc = (import ../data/aliases.nix).services.pjournal; - in -{ +let + mpd_loc = (import ../data/aliases.nix).services.mpd; + mpdweb_loc = (import ../data/aliases.nix).services.mpdweb; + pjournal_loc = (import ../data/aliases.nix).services.pjournal; +in { imports = [ ./orbekk-pkgs.nix ]; security.acme.acceptTerms = true; @@ -13,7 +13,8 @@ # I'm storing web files in /home. systemd.services.nginx.serviceConfig.ProtectHome = "read-only"; - systemd.services.nginx.serviceConfig.ReadWritePaths = ["/storage/srv/kj.orbekk.com/tmp/hls/"]; + systemd.services.nginx.serviceConfig.ReadWritePaths = + [ "/storage/srv/kj.orbekk.com/tmp/hls/" ]; services.nginx = { enable = true; @@ -49,38 +50,31 @@ } } ''; - virtualHosts = let template = { - enableACME = true; - forceSSL = true; - }; - in { - "tommvo.com" = template // { - root = "/storage/srv/tommvo.com"; - }; - "orbekk.no" = template // { - root = "/storage/srv/orbekk.com"; - }; - "orbekk.com" = template // { - root = "/storage/srv/orbekk.com"; + virtualHosts = let + template = { + enableACME = true; + forceSSL = true; }; + in { + "tommvo.com" = template // { root = "/storage/srv/tommvo.com"; }; + "orbekk.no" = template // { root = "/storage/srv/orbekk.com"; }; + "orbekk.com" = template // { root = "/storage/srv/orbekk.com"; }; "wifi.orbekk.com" = template // { root = "/storage/srv/wifi.orbekk.com"; }; - "wifi.orbekk.no" = template // { - root = "/storage/srv/wifi.orbekk.com"; - }; + "wifi.orbekk.no" = template // { root = "/storage/srv/wifi.orbekk.com"; }; "kj.orbekk.com" = template // { root = "/home/orbekk/www-public"; locations."/" = { extraConfig = '' - try_files $uri @storage; - # kill cache - add_header Last-Modified $date_gmt; - add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - if_modified_since off; - expires off; - etag off; - ''; + try_files $uri @storage; + # kill cache + add_header Last-Modified $date_gmt; + add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; + if_modified_since off; + expires off; + etag off; + ''; }; locations."/hls" = { extraConfig = '' @@ -113,8 +107,8 @@ locations."@storage" = { root = "/storage/srv/kj.orbekk.com"; extraConfig = '' - autoindex on; - ''; + autoindex on; + ''; }; # locations."/dav" = { # root = "/storage/srv/kj.orbekk.com"; -- cgit v1.2.3