mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 12:51:34 +01:00
Add global lib relativePath
This commit is contained in:
parent
39bd59c8ee
commit
56f11d4ade
4 changed files with 19 additions and 9 deletions
|
|
@ -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}/";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue