Add global lib relativePath

This commit is contained in:
SebastianStork 2025-11-07 21:03:19 +01:00
parent 39bd59c8ee
commit 56f11d4ade
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
4 changed files with 19 additions and 9 deletions

View file

@ -1,4 +1,8 @@
lib: {
{
lib,
self,
}:
{
isTailscaleDomain = domain: domain |> lib.hasSuffix ".ts.net";
subdomainOf = domain: domain |> lib.splitString "." |> lib.head;
@ -15,4 +19,6 @@ lib: {
mkUnprotectedMessage =
name: "${name} should only be exposed on private networks; access control isn't yet configured";
relativePath = path: path |> toString |> lib.removePrefix "${self}/";
}