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

17 lines
288 B
Nix
Raw Permalink Normal View History

# Extra utility functions
2024-12-06 18:04:47 +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)
];
}