Hey everyone, I’m trying setup syncthing on my desktop that is using nixos now and I have this problem where when the client’s server process does not maintain the folders when restarted and the declarative options don’t seem to work on the client side.
client’s code
services.syncthing = {
enable = true;
openDefaultPorts = true; # TCP/UDP 22000 UDP 21027
user = "${user}";
dataDir = "/home/${user}";
configDir = "/home/${user}/.config";
settings = {
devices."Paisley-Park" = {
id = "HYS7CC6-I4BKAQL-ZIZL23L-LQR5PK6-OJ2HGVW-HQU64QD-UQQLDTQ-JXPZSAG";
};
folder = {
"ryujinx" = {
path = "~/.config/Ryujinx/bis";
devices = [ "Paisley-Park" ];
};
"unrailed" = {
path = "~/.local/share/UnrailedGame/GameState/AllPlayers/SaveGames";
devices = [ "Paisley-Park" ];
};
};
};
};
networking.firewall = {
allowedTCPPorts = [ 8384 ];
};
server’s code
services.syncthing = {
enable = true;
guiAddress = "0.0.0.0:8384";
openDefaultPorts = true;
devices = {
"Mythra" = {
id = "UEN335T-27HR62N-ULJMQCF-XKQ26ZS-EAK4CCY-STSSXTK-S65PO63-5SIEWAC";
};
"steamdeck" = {
id = "3HLGLKX-DDVZOQR-TDALFVX-LDPR7E7-3WOQT3F-XKQCCDX-W2RBFBK-XLK4CQT";
};
};
extraOptions.gui = {
user = "redhawk";
password = "password";
};
folders = {
# https://github.com/Ryujinx/Ryujinx/issues/3975#issuecomment-2002290391
"ryujinx" = {
path = "~/ryujinx";
devices = [ "Mythra" "steamdeck" ];
versioning = {
type = "simple";
params = {
keep = "3";
cleanoutDays = "14";
};
};
};
"unrailed" = {
path = "~/unrailed";
devices = [ "Mythra" "steamdeck" ];
versioning = {
type = "simple";
params = {
keep = "3";
cleanoutDays = "14";
};
};
};
"yuzu" = {
path = "~/yuzu";
# devices = [ "Mythra" "steamdeck" ];
versioning = {
type = "simple";
params = {
keep = "3";
cleanoutDays = "14";
};
};
};
};
};
networking.firewall = {
allowedTCPPorts = [ 8384 ];
};