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

@@ -14,6 +14,7 @@
../services/samba.nix
../services/ssh.nix
../services/step-ca.nix
#../services/syncthing.nix
../services/wireguard.nix
### Other Modules ###
#../games/palworld.nix

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 ];
}

View File

@@ -22,4 +22,6 @@ in
"kavita.age".publicKeys = [ nix-test-vm server kop ];
"step-ca-pw.age".publicKeys = [ nix-test-vm server kop ];
"step-ca-key.age".publicKeys = [ nix-test-vm server kop ];
"syncthing-key.age".publicKeys = [ server kop ];
"syncthing-cert.age".publicKeys = [ server kop ];
}

BIN
secrets/syncthing-cert.age Normal file

Binary file not shown.

BIN
secrets/syncthing-key.age Normal file

Binary file not shown.