47 lines
1.4 KiB
Nix
Executable file
47 lines
1.4 KiB
Nix
Executable file
{config, ...}: {
|
|
services.syncthing = {
|
|
enable = true;
|
|
key = config.age.secrets.syncthingKey.path;
|
|
cert = config.age.secrets.syncthingCert.path;
|
|
guiAddress = "0.0.0.0:8384";
|
|
settings.folders = {
|
|
"passwords" = {
|
|
path = "${config.services.syncthing.dataDir}/passwords";
|
|
};
|
|
"steam-201810" = {
|
|
label = "Wolfenstein The New Order Saves";
|
|
id = "laxxf-t2wmy";
|
|
devices = ["steamdeck" "server" "pc" "winmax2"];
|
|
path = "${config.services.syncthing.dataDir}/steam-201810";
|
|
};
|
|
"retroarch" = {
|
|
label = "RetroArch";
|
|
id = "jxuou-2yjnu";
|
|
devices = ["steamdeck" "server" "pc" "winmax2"];
|
|
path = "${config.services.syncthing.dataDir}/retroarch";
|
|
};
|
|
"pcsx2" = {
|
|
label = "PCSX2";
|
|
id = "qcdsp-qaaej";
|
|
devices = ["steamdeck" "server" "pc" "winmax2"];
|
|
path = "${config.services.syncthing.dataDir}/pcsx2";
|
|
};
|
|
};
|
|
};
|
|
systemd.services.syncthing.serviceConfig = {
|
|
# Allow syncthing to change ownership of files
|
|
AmbientCapabilities = "CAP_CHOWN CAP_FOWNER";
|
|
};
|
|
|
|
# Add a cname for syncthing
|
|
services.dnsmasq.settings.cname = ["sync.everest.tailscale,everest"];
|
|
|
|
# Set up caddy as the reverse proxy for syncthing
|
|
services.caddy.virtualHosts.syncthing = {
|
|
hostName = "sync.everest.tailscale";
|
|
extraConfig = ''
|
|
import tailscale
|
|
reverse_proxy localhost:8384
|
|
'';
|
|
};
|
|
}
|