syncthing and shit

This commit is contained in:
jacekpoz 2023-07-16 09:16:57 +02:00
parent 8d4f5cd7be
commit 26a51f020a
3 changed files with 18 additions and 27 deletions

View file

@ -4,5 +4,6 @@ _: {
./configuration.nix
./grafana.nix
./hardware-configuration.nix
./syncthing.nix
];
}

View file

@ -1,27 +0,0 @@
{
config,
pkgs,
inputs,
...
}: {
virtualisation.oci-containers.containers = {
memos = {
image = "ghcr.io/usememos/memos:latest";
ports = [ "127.0.0.1:5230:5230" ];
volumes = [ "/var/opt/memos:/var/opt/memos" ];
cmd = [
"--name memos"
];
};
};
services.caddy = {
enable = true;
virtualHosts."n.jacekpoz.pl".extraConfig = ''
reverse_proxy * localhost:5230
'';
};
networking.firewall.allowedTCPPorts = [ 5230 ];
networking.firewall.allowedUDPPorts = [ 5230 ];
}

View file

@ -0,0 +1,17 @@
{
config,
pkgs,
inputs,
...
}: {
services.syncthing = {
enable = true;
user = "syncthing";
dataDir = "/var/lib/syncthing";
overrideDevices = true;
overrideFolders = true;
};
networking.firewall.allowedTCPPorts = [ 8384 22000 ];
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
}