refactor: move kanidm to tei

This commit is contained in:
arcnmx 2024-01-14 09:40:34 -08:00
parent b9e1f544f7
commit b892e420ab
7 changed files with 80 additions and 28 deletions

24
modules/nixos/access.nix Normal file
View file

@ -0,0 +1,24 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkOption;
inherit (config.networking) hostName;
in {
options.networking.access = with lib.types; {
hostnameForNetwork = mkOption {
type = attrsOf str;
default = { };
};
};
config.networking.access = {
hostnameForNetwork = {
local = mkIf config.services.avahi.enable "${hostName}.local";
tail = mkIf config.services.tailscale.enable "${hostName}.tail.cutie.moe";
global = mkIf config.networking.enableIPv6 "${hostName}.cutie.moe";
};
};
}