1
1
Fork 0

syncthings: allow for multiple option instances

This commit is contained in:
Tim Van Baak 2024-02-07 05:38:03 +00:00
parent 451d4da000
commit 92b3d5c56e
1 changed files with 422 additions and 414 deletions

View File

@ -3,8 +3,8 @@
with lib;
let
cfg = config.services.syncthing;
opt = options.services.syncthing;
cfg = config.services.syncthings;
opt = options.services.syncthings;
defaultUser = "syncthing";
defaultGroup = defaultUser;
settingsFormat = pkgs.formats.json { };
@ -145,7 +145,12 @@ let
in {
###### interface
options = {
services.syncthing = {
services.syncthings = {
instances = mkOption {
description = mdDoc "Syncthing instance definitions";
default = {};
type = types.attrsOf (types.submodule {
options = {
enable = mkEnableOption
(lib.mdDoc "Syncthing, a self-hosted open-source alternative to Dropbox and Bittorrent Sync");
@ -601,6 +606,9 @@ in {
'';
};
};
});
};
};
};
###### implementation