syncthings: allow for multiple option instances
This commit is contained in:
parent
451d4da000
commit
92b3d5c56e
@ -3,8 +3,8 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.syncthing;
|
cfg = config.services.syncthings;
|
||||||
opt = options.services.syncthing;
|
opt = options.services.syncthings;
|
||||||
defaultUser = "syncthing";
|
defaultUser = "syncthing";
|
||||||
defaultGroup = defaultUser;
|
defaultGroup = defaultUser;
|
||||||
settingsFormat = pkgs.formats.json { };
|
settingsFormat = pkgs.formats.json { };
|
||||||
@ -145,7 +145,12 @@ let
|
|||||||
in {
|
in {
|
||||||
###### interface
|
###### interface
|
||||||
options = {
|
options = {
|
||||||
services.syncthing = {
|
services.syncthings = {
|
||||||
|
instances = mkOption {
|
||||||
|
description = mdDoc "Syncthing instance definitions";
|
||||||
|
default = {};
|
||||||
|
type = types.attrsOf (types.submodule {
|
||||||
|
options = {
|
||||||
|
|
||||||
enable = mkEnableOption
|
enable = mkEnableOption
|
||||||
(lib.mdDoc "Syncthing, a self-hosted open-source alternative to Dropbox and Bittorrent Sync");
|
(lib.mdDoc "Syncthing, a self-hosted open-source alternative to Dropbox and Bittorrent Sync");
|
||||||
@ -601,6 +606,9 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
Loading…
Reference in New Issue
Block a user