syncthing

This commit is contained in:
m3tam3re 2023-02-21 14:52:38 +01:00
parent 9704df774d
commit 0ad10eca88
13 changed files with 98 additions and 5 deletions

View File

@ -17,15 +17,14 @@
xdg.mimeApps.enable = true; xdg.mimeApps.enable = true;
home.sessionVariables = { home.sessionVariables = {
QT_QPA_PLATFORMTHEME = "qt5ct";
WEBKIT_DISABLE_COMPOSITING_MODE = "1"; WEBKIT_DISABLE_COMPOSITING_MODE = "1";
EDITOR = "emacs"; EDITOR = "emacs";
VISUAL = "emacs"; VISUAL = "emacs";
XDG_CONFIG_HOME = "\${HOME}/.config"; XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_BIN_HOME = "\${HOME}/.local/bin"; XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share"; XDG_DATA_HOME = "\${HOME}/.local/share";
PATH = [ "\${XDG_BIN_HOME}" "\${HOME}/.cargo/bin" ];
}; };
home.sessionPath = [ "\${XDG_BIN_HOME}" "\${HOME}/.cargo/bin" ];
home.packages = with pkgs; [ home.packages = with pkgs; [
alacritty alacritty

View File

@ -1,6 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
nextcloud-client
libreoffice libreoffice
neomutt neomutt
tutanota-desktop tutanota-desktop

View File

@ -60,6 +60,10 @@
file = ../../secrets/littlelink-lanakk-env.age; file = ../../secrets/littlelink-lanakk-env.age;
mode = "770"; mode = "770";
}; };
littlelink-m3tam3re-env = {
file = ../../secrets/littlelink-m3tam3re-env.age;
mode = "770";
};
}; };
identityPaths = [ "/home/m3tam3re/.ssh/lkk-nix-1" ]; identityPaths = [ "/home/m3tam3re/.ssh/lkk-nix-1" ];
}; };

View File

@ -0,0 +1,8 @@
{ config, outputs, ... }: {
virtualisation.oci-containers.containers."cal" = {
image = "calcom.docker.scarf.sh/calcom/cal.com";
environmentFiles = [ config.age.secrets.littlelink-lanakk-env.path ];
ports = [ "3013:3000" ];
extraOptions = [ "--ip=10.88.0.23" ];
};
}

View File

@ -5,6 +5,7 @@
./little-link.nix ./little-link.nix
./matomo.nix ./matomo.nix
./nextcloud.nix ./nextcloud.nix
./nginx.nix
./wordpress.nix ./wordpress.nix
./wireguard.nix ./wireguard.nix
]; ];

View File

@ -7,7 +7,7 @@
}; };
virtualisation.oci-containers.containers."littlelink_m3tam3re" = { virtualisation.oci-containers.containers."littlelink_m3tam3re" = {
image = "ghcr.io/techno-tim/littlelink-server"; image = "ghcr.io/techno-tim/littlelink-server";
environmentFiles = [ config.age.secrets.littlelink-lanakk-env.path ]; environmentFiles = [ config.age.secrets.littlelink-m3tam3re-env.path ];
ports = [ "3011:3000" ]; ports = [ "3011:3000" ];
extraOptions = [ "--ip=10.88.0.21" ]; extraOptions = [ "--ip=10.88.0.21" ];
}; };

View File

@ -0,0 +1,8 @@
{ config, outputs, ... }: {
virtualisation.oci-containers.containers."http-images" = {
image = "docker.io/nginx:alpine";
ports = [ "3012:80" ];
volumes = [ "/opt/service-data/http-images:/usr/share/nginx/html"];
extraOptions = [ "--ip=10.88.0.22" ];
};
}

View File

@ -8,6 +8,7 @@
./n8n.nix ./n8n.nix
./postgres.nix ./postgres.nix
./searx.nix ./searx.nix
./syncthing.nix
./traefik.nix ./traefik.nix
]; ];
} }

View File

@ -0,0 +1,20 @@
{ config, pkgs, ... }: {
services.syncthing = {
enable = true;
openDefaultPorts = true;
guiAddress = "0.0.0.0:8384";
overrideDevices = true;
overrideFolders = true;
devices = {
"LK-DATA" = {
id = "BI7CMZF-2SGQMXW-RG47HRG-FEH454J-ZTCE544-BXNSCSJ-PXCE7A7-R4CX2Q3";
};
};
folders = {
"Bildvorschauen" = {
path = "/opt/service-data/http-images";
devices = [ "LK-DATA" ];
};
};
};
}

View File

@ -11,6 +11,13 @@
dnsChallenge = { provider = "godaddy"; }; dnsChallenge = { provider = "godaddy"; };
}; };
}; };
lets-encrypt = {
acme = {
email = "dev@lanakk.com";
storage = "/var/lib/traefik/acme.json";
tlsChallenge = {};
};
};
}; };
api = { }; api = { };
entryPoints = { entryPoints = {
@ -39,6 +46,15 @@
replacement = "https://\${1}/remote.php/dav"; replacement = "https://\${1}/remote.php/dav";
}; };
}; };
nextcloud_headers = {
headers = {
referrerPolicy = "no-referrer";
stsSeconds = "31536000";
forceSTSHeader = true;
stsPreload = true;
stsIncludeSubdomains = true;
};
};
}; };
services = { services = {
baserow.loadBalancer.servers = [{ url = "http://localhost:3001/"; }]; baserow.loadBalancer.servers = [{ url = "http://localhost:3001/"; }];
@ -61,6 +77,10 @@
[{ url = "http://localhost:3010/"; }]; [{ url = "http://localhost:3010/"; }];
littlelink-m3tam3re.loadBalancer.servers = littlelink-m3tam3re.loadBalancer.servers =
[{ url = "http://localhost:3011/"; }]; [{ url = "http://localhost:3011/"; }];
http-images.loadBalancer.servers =
[{ url = "http://localhost:3012/"; }];
syncthing.loadBalancer.servers =
[{ url = "http://localhost:8384/"; }];
}; };
routers = { routers = {
api = { api = {
@ -112,6 +132,15 @@
service = "matomo"; service = "matomo";
entrypoints = "websecure"; entrypoints = "websecure";
}; };
matomo-weltkarte-pinnwand = {
rule = "Host(`stats.weltkarte-pinnwand.com`)";
tls = {
certResolver = "godaddy";
domains = "stats.weltkarte-pinnwand.com";
};
service = "matomo";
entrypoints = "websecure";
};
searx = { searx = {
rule = "Host(`search.lanakk.com`)"; rule = "Host(`search.lanakk.com`)";
tls = { tls = {
@ -138,7 +167,7 @@
}; };
service = "nextcloud"; service = "nextcloud";
entrypoints = "websecure"; entrypoints = "websecure";
middlewares = "nextcloud_redirectregex"; middlewares = "nextcloud_redirectregex,nextcloud_headers";
}; };
wireguard = { wireguard = {
rule = "Host(`wg.lanakk.com`)"; rule = "Host(`wg.lanakk.com`)";
@ -178,9 +207,30 @@
service = "littlelink-lanakk"; service = "littlelink-lanakk";
entrypoints = "websecure"; entrypoints = "websecure";
}; };
http-images = {
rule = "Host(`media.lanakk.com`)";
tls = {
certResolver = "godaddy";
domains = "media.lanakk.com";
};
service = "http-images";
entrypoints = "websecure";
};
syncthing = {
rule = "Host(`sync.lanakk.com`)";
tls = {
certResolver = "godaddy";
domains = "sync.lanakk.com";
};
service = "syncthing";
entrypoints = "websecure";
};
littlelink-m3tm3re = { littlelink-m3tm3re = {
rule = "Host(`links.m3tam3re.com`)"; rule = "Host(`links.m3tam3re.com`)";
tls = { domains = "links.m3tam3re.com"; }; tls = {
certResolver = "lets-encrypt";
domains = "links.m3tam3re.com";
};
service = "littlelink-m3tam3re"; service = "littlelink-m3tam3re";
entrypoints = "websecure"; entrypoints = "websecure";
}; };

View File

@ -16,6 +16,7 @@ in {
"briefkasten-env.age".publicKeys = [ root ]; "briefkasten-env.age".publicKeys = [ root ];
"littlelink-lanakk-env.age".publicKeys = [ root ]; "littlelink-lanakk-env.age".publicKeys = [ root ];
"littlelink-m3tam3re-env.age".publicKeys = [ root ];
"traefik-env.age".publicKeys = [ root ]; "traefik-env.age".publicKeys = [ root ];
} }

Binary file not shown.

Binary file not shown.