add Programming to Syncthing

This commit is contained in:
KoenDR06 2025-10-22 19:16:22 +02:00
parent b59e027503
commit e1eef0c5b6

View file

@ -5,6 +5,7 @@
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.horseman.network.syncthing; cfg = config.horseman.network.syncthing;
username = config.horseman.username;
in { in {
options = { options = {
horseman.network.syncthing = { horseman.network.syncthing = {
@ -15,10 +16,10 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.syncthing = { services.syncthing = {
enable = true; enable = true;
user = "horseman"; user = username;
group = "users"; group = "users";
dataDir = "/home/horseman"; dataDir = "/home/${username}";
configDir = "/home/horseman/.config/syncthing"; configDir = "/home/${username}/.config/syncthing";
overrideDevices = true; overrideDevices = true;
# overrideFolders = true; # overrideFolders = true;
settings = { settings = {
@ -45,7 +46,12 @@ in {
folders = { folders = {
"Documents" = { "Documents" = {
id = "documentFolder"; id = "documentFolder";
path = "/home/horseman/Documents"; path = "/home/${username}/Documents";
devices = ["luna" "terra" "solis"];
};
"Programming" = {
id = "programmingFolder";
path = "/home/${username}/Programming";
devices = ["luna" "terra" "solis"]; devices = ["luna" "terra" "solis"];
}; };
}; };