1
0
Fork 0
nix-configuration/lib/default.nix

16 lines
262 B
Nix
Raw Permalink Normal View History

2024-12-06 16:16:58 +00:00
{
lib,
}:
{
# Parses the domain from a URI
getDomainFromURI =
url:
let
parsedURL = (lib.strings.splitString "." url);
in
builtins.concatStringsSep "." [
(builtins.elemAt parsedURL 1)
(builtins.elemAt parsedURL 2)
];
}