syncthing+nx2site(trying)
This commit is contained in:
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -3,6 +3,10 @@
|
||||
let
|
||||
in
|
||||
{
|
||||
networking.nameservers = [
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
|
||||
networking.hostName = host;
|
||||
|
||||
@@ -10,5 +14,5 @@ in
|
||||
enable = true;
|
||||
};
|
||||
|
||||
networking.enableIPv6 = true;
|
||||
networking.enableIPv6 = false;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ config, pkgs, lib, user, host, ... }:
|
||||
lib.mkIf false
|
||||
# lib.mkIf (host == "NxACE")
|
||||
((import ./nx2site/proxy.nix { inherit config pkgs lib user; }) //
|
||||
# lib.mkIf false
|
||||
lib.mkIf (host == "NxACE")
|
||||
# ((import ./nx2site/proxy.nix { inherit config pkgs lib user; }) //
|
||||
(
|
||||
{
|
||||
sops.secrets = {
|
||||
"nx2site/namecheap.pw" = { };
|
||||
@@ -115,5 +116,6 @@ lib.mkIf false
|
||||
"172.1.8.1" = [ "llm.docker" ];
|
||||
# "172.1.9.1" = [ "proxy.docker" ];
|
||||
"172.1.10.1" = [ "share.docker" ];
|
||||
"172.1.11.1" = [ "odq.docker" ];
|
||||
};
|
||||
})
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
{ config, pkgs, lib, user }:
|
||||
lib.mkIf false
|
||||
{
|
||||
sops.secrets = {
|
||||
"nx2site/sslCertificate.pem" = { owner = config.services.nginx.user; };
|
||||
"nx2site/sslCertificateKey.pem" = { owner = config.services.nginx.user; };
|
||||
"nx2site/dhparams.pem" = { owner = config.services.nginx.user; };
|
||||
};
|
||||
services.nginx = let
|
||||
config-root = /home/${user}/nx2site/proxy/config;
|
||||
xcontent-root = /home/${user}/nx2site/proxy/xcontent;
|
||||
content-root = /home/${user}/nx2site/proxy/content;
|
||||
in {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
additionalModules = [];
|
||||
# appendConfig = '''';
|
||||
@@ -116,8 +113,7 @@
|
||||
};
|
||||
};
|
||||
# "dev.nx2.site" = {
|
||||
# kTLS = true; http2 = true; http3 = true; http3_hq = true; quic = true;
|
||||
sslCertificate = cert; sslCertificateKey = key;
|
||||
# inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic;
|
||||
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ];
|
||||
# locations = {
|
||||
# "/" = {
|
||||
@@ -149,7 +145,7 @@
|
||||
"/socket.io" = {
|
||||
proxyPass = "http://share/socket.io";
|
||||
proxyWebsockets = true;
|
||||
# extraConfig = [
|
||||
# extraConfig = [
|
||||
# ''proxy_http_version 1.1;''
|
||||
# ''proxy_set_header Upgrade $http_upgrade;''
|
||||
# ''proxy_set_header Connection "upgrade";''
|
||||
@@ -176,9 +172,7 @@
|
||||
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ];
|
||||
root = "/home/nx2/nx2site/staticweb/xcontent/";
|
||||
locations = {
|
||||
"~.*" = {
|
||||
return = "502 /502.html";
|
||||
};
|
||||
"~.*" = { return = "502 /502.html"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,7 +17,12 @@ let
|
||||
};
|
||||
|
||||
dirs = {
|
||||
default = { name = "sync"; path = "/home/${user}/sync"; };
|
||||
default = { name = "sync"; path = "/home/${user}/sync"; };
|
||||
s21u-dcim = { name = "s21u-dcim"; path = "/vault/Pictures/Lennart"; };
|
||||
diane-dcim = { name = "diane-dcim"; path = "/vault/Pictures/Diane"; };
|
||||
dianesd-dcim = { name = "dianesd-dcim"; path = "/vault/Pictures/Diane-SD"; };
|
||||
daniel-dcim = { name = "daniel-dcim"; path = "/vault/Pictures/Daniel"; };
|
||||
tessa-dcim = { name = "tessa-dcim"; path = "/vault/Pictures/Tessa"; };
|
||||
};
|
||||
in
|
||||
lib.mkIf (user != "tv")
|
||||
@@ -45,8 +50,7 @@ lib.mkIf (user != "tv")
|
||||
) else if (host == "NxNORTH") then (
|
||||
xps // ace // s21u
|
||||
) else (
|
||||
# north // xps // s21u // diane // daniel // tessa // georg
|
||||
north // xps // s21u
|
||||
north // xps // s21u // diane // daniel // tessa // georg
|
||||
);
|
||||
folders = with dirs; if (host == "NxXPS") then {
|
||||
"${default.name}" = {
|
||||
@@ -58,11 +62,31 @@ lib.mkIf (user != "tv")
|
||||
path = default.path;
|
||||
devices = with devices; (justname [ xps ace s21u ]);
|
||||
};
|
||||
} else {
|
||||
} else { # NxACE
|
||||
"${default.name}" = {
|
||||
path = default.path;
|
||||
devices = with devices; (justname [ xps north s21u ]);
|
||||
};
|
||||
"${s21u-dcim.name}" = {
|
||||
path = s21u-dcim.path;
|
||||
devices = with devices; (justname [ s21u ]);
|
||||
};
|
||||
"${diane-dcim.name}" = {
|
||||
path = diane-dcim.path;
|
||||
devices = with devices; (justname [ diane ]);
|
||||
};
|
||||
"${dianesd-dcim.name}" = {
|
||||
path = dianesd-dcim.path;
|
||||
devices = with devices; (justname [ diane ]);
|
||||
};
|
||||
"${daniel-dcim.name}" = {
|
||||
path = daniel-dcim.path;
|
||||
devices = with devices; (justname [ daniel ]);
|
||||
};
|
||||
"${tessa-dcim.name}" = {
|
||||
path = tessa-dcim.path;
|
||||
devices = with devices; (justname [ tessa ]);
|
||||
};
|
||||
};
|
||||
gui = {
|
||||
theme = "black";
|
||||
|
||||
Reference in New Issue
Block a user