summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2021-07-14 21:27:30 -0400
committerKjetil Orbekk <kj@orbekk.com>2021-07-14 21:27:30 -0400
commit7bed120d559ea04811c02e6baf9dd662029f78f5 (patch)
tree7f64f5f7dafa57857e145caaf3a8969f9ea3d92d
parentaa395f21e4a17b32e0d89a823afa914f1242549c (diff)
get rid of tabs
-rw-r--r--config/web-server.nix58
1 files 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";