nix-config/home/syncthing.nix

25 lines
634 B
Nix

{ pkgs, ... }:
{
# Syncthing - p2p file sync
# Config stored in ~/Library/Application Support/Syncthing/ (default)
# Currently syncs: music, traces
# Devices: poppy (this mac) + remote (UCWTYQI-...)
home.packages = [ pkgs.syncthing ];
# Autostart via launchd
# -no-browser: don't open GUI on startup
# KeepAlive: restart if crashes
# RunAtLoad: start at login
launchd.agents.syncthing = {
enable = true;
config = {
ProgramArguments = [
"${pkgs.syncthing}/bin/syncthing"
"serve"
];
RunAtLoad = true;
KeepAlive = true;
ProcessType = "Background";
};
};
}