Format the entire project.

This commit is contained in:
Kevin Baensch 2023-09-11 20:23:04 +02:00
parent 1dc50ae17d
commit 6f9db5e3a4
Signed by: derped
GPG key ID: C0F1D326C7626543
115 changed files with 3451 additions and 2901 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 {}

View file

@ -1,9 +1,12 @@
{ config, lib, ... }:
with lib;
{
vHost = {
root = "/var/www";
};
}.vHost
config,
lib,
...
}:
with lib;
{
vHost = {
root = "/var/www";
};
}
.vHost