diff --git a/config/Syncthing.nix b/config/Syncthing.nix index 51715d6..40c6a4f 100644 --- a/config/Syncthing.nix +++ b/config/Syncthing.nix @@ -102,7 +102,7 @@ in }; "dasha" = { path = "${cfg.dataDir}/dasha"; - devices = ["home"] ++ allDashaDevices; + devices = [ "home" ] ++ allDashaDevices; }; }; }; diff --git a/host/x86_64-linux/home/Const.nix b/host/x86_64-linux/home/Const.nix index b16e331..180ed9c 100644 --- a/host/x86_64-linux/home/Const.nix +++ b/host/x86_64-linux/home/Const.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ config.const.host = { nginx = { domain = "voronind.com"; diff --git a/host/x86_64-linux/home/nginx/Change.nix b/host/x86_64-linux/home/nginx/Change.nix index 714a155..28efda1 100644 --- a/host/x86_64-linux/home/nginx/Change.nix +++ b/host/x86_64-linux/home/nginx/Change.nix @@ -7,9 +7,11 @@ in inherit (cfg) sslCertificate sslCertificateKey extraConfig; locations."/" = { proxyPass = "http://127.0.0.1:5001$request_uri"; - extraConfig = cfg.allowLocal + '' - add_header Referrer-Policy 'origin'; - ''; + extraConfig = + cfg.allowLocal + + '' + add_header Referrer-Policy 'origin'; + ''; }; }; } diff --git a/host/x86_64-linux/home/nginx/Cups.nix b/host/x86_64-linux/home/nginx/Cups.nix index a147622..063f1b3 100644 --- a/host/x86_64-linux/home/nginx/Cups.nix +++ b/host/x86_64-linux/home/nginx/Cups.nix @@ -8,11 +8,13 @@ in locations."/" = { proxyPass = "http://[::1]:631$request_uri"; recommendedProxySettings = false; - extraConfig = cfg.allowLocal + '' - proxy_set_header Host "127.0.0.1"; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; - ''; + extraConfig = + cfg.allowLocal + + '' + proxy_set_header Host "127.0.0.1"; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; + ''; }; }; } diff --git a/host/x86_64-linux/home/nginx/Hass.nix b/host/x86_64-linux/home/nginx/Hass.nix index fcbc399..da42c8c 100644 --- a/host/x86_64-linux/home/nginx/Hass.nix +++ b/host/x86_64-linux/home/nginx/Hass.nix @@ -8,12 +8,14 @@ in locations."/" = { proxyPass = "http://[::1]:8123$request_uri"; recommendedProxySettings = false; - extraConfig = cfg.allowLocal + '' - proxy_set_header Host $host; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - ''; + extraConfig = + cfg.allowLocal + + '' + proxy_set_header Host $host; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + ''; }; }; } diff --git a/host/x86_64-linux/home/nginx/Homer.nix b/host/x86_64-linux/home/nginx/Homer.nix index 4e2fa50..4462bb1 100644 --- a/host/x86_64-linux/home/nginx/Homer.nix +++ b/host/x86_64-linux/home/nginx/Homer.nix @@ -7,11 +7,13 @@ in inherit (cfg) sslCertificate sslCertificateKey extraConfig; locations."/" = { tryFiles = "$uri $uri/index.html"; - extraConfig = cfg.allowLocal + '' - proxy_set_header Host "127.0.0.1"; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; - ''; + extraConfig = + cfg.allowLocal + + '' + proxy_set_header Host "127.0.0.1"; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; + ''; }; }; } diff --git a/host/x86_64-linux/home/nginx/Invidious.nix b/host/x86_64-linux/home/nginx/Invidious.nix index f1023bc..924ac44 100644 --- a/host/x86_64-linux/home/nginx/Invidious.nix +++ b/host/x86_64-linux/home/nginx/Invidious.nix @@ -7,15 +7,17 @@ in inherit (cfg) sslCertificate sslCertificateKey extraConfig; locations."/" = { proxyPass = "http://[::1]:3001$request_uri"; - extraConfig = cfg.allowLocal + '' - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; - proxy_http_version 1.1; - proxy_set_header Connection ""; - proxy_hide_header Content-Security-Policy; - proxy_hide_header X-Frame-Options; - proxy_hide_header X-Content-Type-Options; - ''; + extraConfig = + cfg.allowLocal + + '' + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + proxy_http_version 1.1; + proxy_set_header Connection ""; + proxy_hide_header Content-Security-Policy; + proxy_hide_header X-Frame-Options; + proxy_hide_header X-Content-Type-Options; + ''; }; }; } diff --git a/host/x86_64-linux/home/nginx/Resume.nix b/host/x86_64-linux/home/nginx/Resume.nix index 585dc15..2ab94e8 100644 --- a/host/x86_64-linux/home/nginx/Resume.nix +++ b/host/x86_64-linux/home/nginx/Resume.nix @@ -5,11 +5,13 @@ in { "resume.${cfg.domain}" = { inherit (cfg) sslCertificate sslCertificateKey extraConfig; - locations."/".extraConfig = cfg.allowLocal + '' - if ($http_accept_language ~ ru) { - return 301 https://git.voronind.com/voronind/resume/releases/download/latest/VoronindRu.pdf; - } - return 301 https://git.voronind.com/voronind/resume/releases/download/latest/VoronindEn.pdf; - ''; + locations."/".extraConfig = + cfg.allowLocal + + '' + if ($http_accept_language ~ ru) { + return 301 https://git.voronind.com/voronind/resume/releases/download/latest/VoronindRu.pdf; + } + return 301 https://git.voronind.com/voronind/resume/releases/download/latest/VoronindEn.pdf; + ''; }; } diff --git a/host/x86_64-linux/home/nginx/Share.nix b/host/x86_64-linux/home/nginx/Share.nix index a1d6624..6021d02 100644 --- a/host/x86_64-linux/home/nginx/Share.nix +++ b/host/x86_64-linux/home/nginx/Share.nix @@ -9,9 +9,11 @@ in locations = { "~* /$" = { inherit root; - extraConfig = cfg.allowLocal + '' - autoindex on; - ''; + extraConfig = + cfg.allowLocal + + '' + autoindex on; + ''; }; "/" = { inherit root; diff --git a/host/x86_64-linux/home/nginx/Sync.nix b/host/x86_64-linux/home/nginx/Sync.nix index 64e2f0d..78d63db 100644 --- a/host/x86_64-linux/home/nginx/Sync.nix +++ b/host/x86_64-linux/home/nginx/Sync.nix @@ -7,10 +7,12 @@ in inherit (cfg) sslCertificate sslCertificateKey extraConfig; locations."/" = { proxyPass = "http://[::1]:8384$request_uri"; - extraConfig = cfg.allowLocal + '' - proxy_set_header Host "localhost"; - proxy_set_header X-Forwarded-Host "localhost"; - ''; + extraConfig = + cfg.allowLocal + + '' + proxy_set_header Host "localhost"; + proxy_set_header X-Forwarded-Host "localhost"; + ''; }; }; } diff --git a/host/x86_64-linux/home/nginx/Tandoor.nix b/host/x86_64-linux/home/nginx/Tandoor.nix index 8ebe542..a3ea826 100644 --- a/host/x86_64-linux/home/nginx/Tandoor.nix +++ b/host/x86_64-linux/home/nginx/Tandoor.nix @@ -7,11 +7,13 @@ in inherit (cfg) sslCertificate sslCertificateKey extraConfig; locations."/" = { proxyPass = "http://[::1]:33122$request_uri"; - extraConfig = cfg.allowLocal + '' - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Proto https; - ''; + extraConfig = + cfg.allowLocal + + '' + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto https; + ''; }; }; } diff --git a/option/Const.nix b/option/Const.nix index 78e94f1..b0cde6c 100644 --- a/option/Const.nix +++ b/option/Const.nix @@ -23,4 +23,3 @@ }; }; } - diff --git a/system/State.nix b/system/State.nix index cb47642..80d89f1 100644 --- a/system/State.nix +++ b/system/State.nix @@ -1,5 +1,5 @@ -{ config, ... }: { +{ config, ... }: +{ # Specify current release version. system.stateVersion = config.const.stateVersion; } -