Implement global custom libs as a flake output

This commit is contained in:
SebastianStork 2025-10-17 10:57:32 +02:00
parent f276848b18
commit 671a13239a
Signed by: SebastianStork
SSH key fingerprint: SHA256:iEM011ogNMG1q8+U500adGu/9rpPuZ2KnFtbdLeqTiI
10 changed files with 40 additions and 31 deletions

View file

@ -2,6 +2,7 @@
config,
self,
lib,
lib',
...
}:
let
@ -51,7 +52,7 @@ in
message = "Running syncthing on a server requires `gui.domain` to be set.";
}
{
assertion = (cfg.gui.domain != null) -> (lib.custom.isTailscaleDomain cfg.gui.domain);
assertion = (cfg.gui.domain != null) -> (lib'.isTailscaleDomain cfg.gui.domain);
message = "The syncthing gui should only be exposed on a private network as it isn't yet configured with access controll.";
}
];
@ -108,7 +109,7 @@ in
genFolders =
folders:
folders
|> lib.custom.genAttrs (name: {
|> lib'.genAttrs (name: {
path = "${dataDir}/${name}";
ignorePerms = false;
devices = config.services.syncthing.settings.devices |> lib.attrNames;