feat: syncthing djuasdhjnasbhjbdahjbdahjsb

This commit is contained in:
Madeleine Sydney
2025-02-02 14:51:04 -07:00
parent c3b93ad52b
commit 672cc6cc8c
3 changed files with 125 additions and 29 deletions

View File

@@ -0,0 +1,35 @@
{ config, lib, pkgs, ... }:
let cfg = config.sydnix.syncthing;
in {
options = {
sydnix.syncthing = {
enable = lib.mkEnableOption "Syncthing";
devices = lib.mkOption {
type = lib.types.anything;
default = {};
};
folders = lib.mkOption {
type = lib.types.anything;
default = {};
};
};
};
config = lib.mkIf cfg.enable {
users.users.${config.services.syncthing.user}.extraGroups = [
"jellyfin"
];
services.syncthing = {
enable = true;
openDefaultPorts = true;
settings = {
overrideDevices = true;
overrideFolders = true;
devices = cfg.devices;
folders = cfg.folders;
};
};
};
}