diff --git a/hosts/chmura/default.nix b/hosts/chmura/default.nix index 2ae076e3..53381152 100644 --- a/hosts/chmura/default.nix +++ b/hosts/chmura/default.nix @@ -4,5 +4,6 @@ _: { ./configuration.nix ./grafana.nix ./hardware-configuration.nix + ./syncthing.nix ]; } diff --git a/hosts/chmura/memos.nix b/hosts/chmura/memos.nix deleted file mode 100644 index 9cffdc09..00000000 --- a/hosts/chmura/memos.nix +++ /dev/null @@ -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 ]; -} diff --git a/hosts/chmura/syncthing.nix b/hosts/chmura/syncthing.nix new file mode 100644 index 00000000..a2d69cab --- /dev/null +++ b/hosts/chmura/syncthing.nix @@ -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 ]; +}