mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 12:51:34 +01:00
Add custom libs subdomainOf and rootDomainOf
This commit is contained in:
parent
f3ea2b75e6
commit
8807d38b57
3 changed files with 9 additions and 10 deletions
|
|
@ -1,3 +1,7 @@
|
|||
lib: {
|
||||
isTailscaleDomain = domain: domain |> lib.hasSuffix ".ts.net";
|
||||
|
||||
subdomainOf = domain: domain |> lib.splitString "." |> lib.head;
|
||||
|
||||
rootDomainOf = domain: domain |> lib.splitString "." |> lib.tail |> lib.concatStringsSep ".";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue