Reformat.
This commit is contained in:
parent
cc23b6de16
commit
71560ca62f
|
@ -102,7 +102,7 @@ in
|
||||||
};
|
};
|
||||||
"dasha" = {
|
"dasha" = {
|
||||||
path = "${cfg.dataDir}/dasha";
|
path = "${cfg.dataDir}/dasha";
|
||||||
devices = ["home"] ++ allDashaDevices;
|
devices = [ "home" ] ++ allDashaDevices;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
config.const.host = {
|
config.const.host = {
|
||||||
nginx = {
|
nginx = {
|
||||||
domain = "voronind.com";
|
domain = "voronind.com";
|
||||||
|
|
|
@ -7,7 +7,9 @@ in
|
||||||
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:5001$request_uri";
|
proxyPass = "http://127.0.0.1:5001$request_uri";
|
||||||
extraConfig = cfg.allowLocal + ''
|
extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
add_header Referrer-Policy 'origin';
|
add_header Referrer-Policy 'origin';
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,9 @@ in
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://[::1]:631$request_uri";
|
proxyPass = "http://[::1]:631$request_uri";
|
||||||
recommendedProxySettings = false;
|
recommendedProxySettings = false;
|
||||||
extraConfig = cfg.allowLocal + ''
|
extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
proxy_set_header Host "127.0.0.1";
|
proxy_set_header Host "127.0.0.1";
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
|
||||||
|
|
|
@ -8,7 +8,9 @@ in
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://[::1]:8123$request_uri";
|
proxyPass = "http://[::1]:8123$request_uri";
|
||||||
recommendedProxySettings = false;
|
recommendedProxySettings = false;
|
||||||
extraConfig = cfg.allowLocal + ''
|
extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
|
|
@ -7,7 +7,9 @@ in
|
||||||
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
tryFiles = "$uri $uri/index.html";
|
tryFiles = "$uri $uri/index.html";
|
||||||
extraConfig = cfg.allowLocal + ''
|
extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
proxy_set_header Host "127.0.0.1";
|
proxy_set_header Host "127.0.0.1";
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
|
||||||
|
|
|
@ -7,7 +7,9 @@ in
|
||||||
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://[::1]:3001$request_uri";
|
proxyPass = "http://[::1]:3001$request_uri";
|
||||||
extraConfig = cfg.allowLocal + ''
|
extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
|
@ -5,7 +5,9 @@ in
|
||||||
{
|
{
|
||||||
"resume.${cfg.domain}" = {
|
"resume.${cfg.domain}" = {
|
||||||
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
||||||
locations."/".extraConfig = cfg.allowLocal + ''
|
locations."/".extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
if ($http_accept_language ~ ru) {
|
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/VoronindRu.pdf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,9 @@ in
|
||||||
locations = {
|
locations = {
|
||||||
"~* /$" = {
|
"~* /$" = {
|
||||||
inherit root;
|
inherit root;
|
||||||
extraConfig = cfg.allowLocal + ''
|
extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
autoindex on;
|
autoindex on;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,9 @@ in
|
||||||
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://[::1]:8384$request_uri";
|
proxyPass = "http://[::1]:8384$request_uri";
|
||||||
extraConfig = cfg.allowLocal + ''
|
extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
proxy_set_header Host "localhost";
|
proxy_set_header Host "localhost";
|
||||||
proxy_set_header X-Forwarded-Host "localhost";
|
proxy_set_header X-Forwarded-Host "localhost";
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -7,7 +7,9 @@ in
|
||||||
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://[::1]:33122$request_uri";
|
proxyPass = "http://[::1]:33122$request_uri";
|
||||||
extraConfig = cfg.allowLocal + ''
|
extraConfig =
|
||||||
|
cfg.allowLocal
|
||||||
|
+ ''
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Forwarded-Proto https;
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
|
|
|
@ -23,4 +23,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ config, ... }: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
# Specify current release version.
|
# Specify current release version.
|
||||||
system.stateVersion = config.const.stateVersion;
|
system.stateVersion = config.const.stateVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue