add share folder

This commit is contained in:
Yan Lin 2025-12-22 17:30:49 +08:00
parent 3b3f080295
commit db00b2e307

View file

@ -39,7 +39,7 @@ in
options.syncthing-custom = {
enabledFolders = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "Credentials" "Documents" "Archive" ];
default = [ "Credentials" "Documents" "Archive" "Share" ];
description = "List of Syncthing folders to enable for this host.";
};
enableGui = lib.mkOption {
@ -108,6 +108,14 @@ in
ignorePerms = true;
versioning = commonVersioning;
};
})
// (lib.optionalAttrs (lib.elem "Share" cfg.enabledFolders) {
"Share" = {
path = "~/Share";
devices = allDevices;
ignorePerms = true;
versioning = commonVersioning;
};
});
# GUI settings with authentication
@ -145,6 +153,9 @@ in
(lib.mkIf (lib.elem "Archive" cfg.enabledFolders) {
"Archive/.stignore".text = stignoreContent;
})
(lib.mkIf (lib.elem "Share" cfg.enabledFolders) {
"Share/.stignore".text = stignoreContent;
})
];
# For NixOS systems, we need to add Syncthing as a manual service in Traefik