syncthing idk
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
../services/samba.nix
|
../services/samba.nix
|
||||||
../services/ssh.nix
|
../services/ssh.nix
|
||||||
../services/step-ca.nix
|
../services/step-ca.nix
|
||||||
|
#../services/syncthing.nix
|
||||||
../services/wireguard.nix
|
../services/wireguard.nix
|
||||||
### Other Modules ###
|
### Other Modules ###
|
||||||
#../games/palworld.nix
|
#../games/palworld.nix
|
||||||
|
|||||||
38
modules/services/syncthing.nix
Normal file
38
modules/services/syncthing.nix
Normal 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 ];
|
||||||
|
}
|
||||||
@@ -22,4 +22,6 @@ in
|
|||||||
"kavita.age".publicKeys = [ nix-test-vm server kop ];
|
"kavita.age".publicKeys = [ nix-test-vm server kop ];
|
||||||
"step-ca-pw.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 ];
|
"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
BIN
secrets/syncthing-cert.age
Normal file
Binary file not shown.
BIN
secrets/syncthing-key.age
Normal file
BIN
secrets/syncthing-key.age
Normal file
Binary file not shown.
Reference in New Issue
Block a user