Add basic syncthing configuration as service

This commit is contained in:
ttacquisti 2024-02-23 20:49:29 +01:00
parent e4dc5144cd
commit eb6cdc1ba7
3 changed files with 17 additions and 0 deletions

View File

@ -24,6 +24,7 @@
./printer.nix
./services.nix
./steam.nix
./syncthing.nix
./vm.nix
];
}

View File

@ -0,0 +1,13 @@
{ pkgs, config, lib, ... }:
let inherit (import ../../options.nix) syncthing username userHome; in
lib.mkIf (syncthing == true) {
services = {
syncthing = {
enable = true;
user = "${username}";
dataDir = "/home/${username}"; # Default folder for new synced folders
configDir = "/home/${username}/.config/syncthing"; # Folder for Syncthing's settings and keys
};
};
}

View File

@ -83,4 +83,7 @@ in {
# Enable Python & PyCharm
python = false;
# Enable SyncThing
syncthing = true;
}