wip: migrate client modules

This commit is contained in:
Leon Schwarzäugl 2026-04-02 19:25:58 +02:00
parent f6d2ff1544
commit 7ce27d5d2f
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
245 changed files with 20254 additions and 188 deletions

View file

@ -0,0 +1,51 @@
{ lib, config, pkgs, ... }:
let
inherit (config.swarselsystems) mainUser homeDir;
devices = config.swarselsystems.syncthing.syncDevices;
servicePort = 8384;
in
{
options.swarselmodules.syncthing = lib.mkEnableOption "syncthing config";
config = lib.mkIf config.swarselmodules.syncthing {
services.syncthing = {
enable = true;
systemService = true;
guiAddress = "127.0.0.1:${builtins.toString servicePort}";
package = pkgs.syncthing;
user = mainUser;
dataDir = homeDir;
configDir = "${homeDir}/.config/syncthing";
openDefaultPorts = true;
overrideDevices = true;
overrideFolders = true;
settings = {
options = {
urAccepted = -1;
};
inherit (config.swarselsystems.syncthing) devices;
folders = {
"Default Folder" = lib.mkDefault {
path = "${homeDir}/Sync";
inherit devices;
id = "default";
};
"Obsidian" = {
path = "${homeDir}/Obsidian";
inherit devices;
id = "yjvni-9eaa7";
};
"Org" = {
path = "${homeDir}/Org";
inherit devices;
id = "a7xnl-zjj3d";
};
"Vpn" = {
path = "${homeDir}/Vpn";
inherit devices;
id = "hgp9s-fyq3p";
};
};
};
};
};
}