refactor: moved modules to legacy-modules

This commit is contained in:
Leyla Becker 2026-04-06 19:32:37 -05:00
parent d646b954ac
commit db7ac35613
233 changed files with 5 additions and 5 deletions

View file

@ -0,0 +1,36 @@
{
config,
lib,
syncthingConfiguration,
...
}: let
mountDir = "/mnt/sync";
configDir = "/etc/syncthing";
in {
config = lib.mkMerge [
{
systemd = lib.mkIf config.services.syncthing.enable {
tmpfiles.rules = [
"A ${mountDir} - - - - u:syncthing:rwX,g:syncthing:rwX,o::-"
"d ${mountDir} 2755 syncthing syncthing -"
"d ${config.services.syncthing.dataDir} 775 syncthing syncthing -"
"d ${config.services.syncthing.configDir} 755 syncthing syncthing -"
];
};
}
(lib.mkIf config.services.syncthing.enable (lib.mkMerge [
{
services.syncthing = {
user = "syncthing";
group = "syncthing";
dataDir = "${mountDir}/default";
configDir = configDir;
overrideDevices = true;
overrideFolders = true;
configuration = syncthingConfiguration;
deviceName = config.networking.hostName;
};
}
]))
];
}