Format the entire project.
This commit is contained in:
parent
1dc50ae17d
commit
6f9db5e3a4
115 changed files with 3451 additions and 2901 deletions
|
@ -1,17 +1,23 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
vHost = if config.services.nix-serve.enable then {
|
||||
extraConfig = ''
|
||||
location / {
|
||||
proxy_pass http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port};
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header REMOTE_ADDR $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
vHost =
|
||||
if config.services.nix-serve.enable
|
||||
then {
|
||||
extraConfig = ''
|
||||
location / {
|
||||
proxy_pass http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port};
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header REMOTE_ADDR $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
}
|
||||
'';
|
||||
}
|
||||
'';
|
||||
} else {};
|
||||
}.vHost
|
||||
else {};
|
||||
}
|
||||
.vHost
|
||||
|
|
|
@ -1,27 +1,33 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
vHost = if config.services.gitea.enable then {
|
||||
root = "${config.services.gitea.stateDir}/public";
|
||||
extraConfig = ''
|
||||
location / {
|
||||
try_files maintain.html $uri $uri/index.html @node;
|
||||
}
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
vHost =
|
||||
if config.services.gitea.enable
|
||||
then {
|
||||
root = "${config.services.gitea.stateDir}/public";
|
||||
extraConfig = ''
|
||||
location / {
|
||||
try_files maintain.html $uri $uri/index.html @node;
|
||||
}
|
||||
|
||||
location @node {
|
||||
client_max_body_size 0;
|
||||
proxy_pass http://${config.services.gitea.settings.server.HTTP_ADDR}:${toString config.services.gitea.settings.server.HTTP_PORT};
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_max_temp_file_size 0;
|
||||
proxy_redirect off;
|
||||
proxy_read_timeout 120;
|
||||
location @node {
|
||||
client_max_body_size 0;
|
||||
proxy_pass http://${config.services.gitea.settings.server.HTTP_ADDR}:${toString config.services.gitea.settings.server.HTTP_PORT};
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_max_temp_file_size 0;
|
||||
proxy_redirect off;
|
||||
proxy_read_timeout 120;
|
||||
}
|
||||
'';
|
||||
}
|
||||
'';
|
||||
} else {};
|
||||
}.vHost
|
||||
else {};
|
||||
}
|
||||
.vHost
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
vHost = if config.services.hydra.enable then {
|
||||
extraConfig = ''
|
||||
location / {
|
||||
proxy_pass http://${config.services.hydra.listenHost}:${toString config.services.hydra.port};
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header REMOTE_ADDR $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
vHost =
|
||||
if config.services.hydra.enable
|
||||
then {
|
||||
extraConfig = ''
|
||||
location / {
|
||||
proxy_pass http://${config.services.hydra.listenHost}:${toString config.services.hydra.port};
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header REMOTE_ADDR $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
}
|
||||
'';
|
||||
}
|
||||
'';
|
||||
} else {};
|
||||
}.vHost
|
||||
else {};
|
||||
}
|
||||
.vHost
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
vHost = if config.mailserver.enable then {
|
||||
serverName = config.mailserver.fqdn;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
} else {};
|
||||
}.vHost
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
vHost =
|
||||
if config.mailserver.enable
|
||||
then {
|
||||
serverName = config.mailserver.fqdn;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
}
|
||||
else {};
|
||||
}
|
||||
.vHost
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
if (config.services.nextcloud.enable == true) then {
|
||||
vHost = {
|
||||
enableACME = config.services.nextcloud.https;
|
||||
forceSSL = config.services.nextcloud.https;
|
||||
};
|
||||
}.vHost else {}
|
||||
if (config.services.nextcloud.enable == true)
|
||||
then
|
||||
{
|
||||
vHost = {
|
||||
enableACME = config.services.nextcloud.https;
|
||||
forceSSL = config.services.nextcloud.https;
|
||||
};
|
||||
}
|
||||
.vHost
|
||||
else {}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
vHost = {
|
||||
root = "/var/www";
|
||||
};
|
||||
}.vHost
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
vHost = {
|
||||
root = "/var/www";
|
||||
};
|
||||
}
|
||||
.vHost
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue