syncthing idk

This commit is contained in:
Kopatz
2024-04-03 20:29:09 +02:00
parent 1ebda6348b
commit 53ed41b86d
5 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
{ config, pkgs, lib, vars, ... }:
let
basePath = "/mnt/1tbssd/syncthing";
in
{
age.secrets.syncthing-key = {
file = ../../secrets/syncthing-key.age;
owner = "syncthing";
group = "syncthing";
};
age.secrets.syncthing-cert = {
file = ../../secrets/syncthing-cert.age;
owner = "syncthing";
group = "syncthing";
};
services.syncthing = {
enable = true;
dataDir = basePath;
openDefaultPorts = true;
cert = "/run/agenix/syncthing-cert";
key = "/run/agenix/syncthing-key";
guiAddress = "0.0.0.0:8384";
settings = {
options.urAccepted = -1;
options.relaysEnabled = false;
devices.kop-pc.id = "2IEILKO-R6UVES4-N27PZRT-YLPOPR3-LTD5SXA-C65FWF3-RYD2B2Y-PEZLTAR";
devices.kop-pc.adresses = [ "tcp://192.168.0.11:51820"];
folders."~/sync" = {
id = "sync";
devices = [ "kop-pc" ];
};
};
};
networking.firewall.allowedTCPPorts = [ 8384 ];
}