another one

This commit is contained in:
martyTF 2026-04-02 18:01:28 +02:00
parent 90513a119c
commit 6225bb0f27
22 changed files with 225 additions and 292 deletions

View 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;
};
};
};
}