another one
This commit is contained in:
parent
90513a119c
commit
6225bb0f27
22 changed files with 225 additions and 292 deletions
52
modules/apps/sync/default.nix
Normal file
52
modules/apps/sync/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
apps.sync = {
|
||||
kde-connect = {
|
||||
enable = lib.mkEnableOption "enable kde-connect";
|
||||
};
|
||||
syncthing = {
|
||||
enable = lib.mkEnableOption "enable syncthing";
|
||||
devices = lib.mkOption {
|
||||
default = { };
|
||||
description = ''
|
||||
set syncthing devices
|
||||
'';
|
||||
};
|
||||
folders = lib.mkOption {
|
||||
default = { };
|
||||
description = ''
|
||||
set syncthing folders
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
programs = {
|
||||
kdeconnect = lib.mkIf config.apps.sync.kde-connect.enable {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
syncthing = lib.mkIf config.apps.sync.syncthing.enable {
|
||||
enable = true;
|
||||
tray.enable = true;
|
||||
guiAddress = "0.0.0.0:8384";
|
||||
settings = {
|
||||
devices = config.apps.sync.syncthing.devices;
|
||||
folders = config.apps.sync.syncthing.folders;
|
||||
};
|
||||
overrideDevices = lib.mkIf (config.apps.sync.syncthing.devices == { }) false;
|
||||
overrideFolders = lib.mkIf (config.apps.sync.syncthing.folders == { }) false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue