Files
nixos-blueprint/modules/home/programs/syncthing.nix
2025-03-13 13:18:22 +02:00

46 lines
1.1 KiB
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.syncthing;
in {
options = {
syncthing.enable = mkEnableOption "enable syncthing";
};
config = mkIf cfg.enable {
systemd.user.services.syncthing.Environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
services.syncthing = {
enable = true;
tray.enable = true;
settings = {
options = {
urAccepted = -1;
relaysEnabled = false;
};
devices = {
"dunamis" = {id = "72VRZFX-65SZUKP-2XL2WLG-75MMKLG-PQLDEZN-G5OI5U7-RLF4OHS-LNCXEQX";};
"sarien" = {id = "LUVZGFV-OV6FV5E-SDROWHZ-4BR5PFB-VP5Y326-AFEP6NL-ORUMJQQ-SSYCQQO";};
};
folders = {
"docs" = {
path = "/home/user/docs";
devices = [
"dunamis"
"sarien"
];
};
"programming" = {
path = "/home/user/programming";
devices = [
"dunamis"
"sarien"
];
};
};
};
};
};
}