modules/enterprise: use tools

This commit is contained in:
Max Headroom 2021-10-16 14:27:20 +02:00
parent 8edfb74587
commit 3ea78c24f8

View file

@ -1,7 +1,8 @@
{ pkgs, lib, config, inputs, ... }: { config, pkgs, hosts, inputs, lib, tools, ... }:
let let
orgDomain = "privatevoid.net"; orgDomain = tools.meta.domain;
orgRealm = "PRIVATEVOID.NET"; orgRealm = lib.toUpper orgDomain;
host = hosts.${config.networking.hostName} or null;
in { in {
krb5 = { krb5 = {
enable = true; enable = true;
@ -19,7 +20,7 @@ in {
}; };
realms = { realms = {
"${orgRealm}" = rec { "${orgRealm}" = rec {
kdc = "authsys.virtual-machines.privatevoid.net"; inherit (tools.identity.kerberos) kdc;
admin_server = kdc; admin_server = kdc;
kpasswd_server = kdc; kpasswd_server = kdc;
default_domain = orgDomain; default_domain = orgDomain;
@ -27,6 +28,6 @@ in {
}; };
}; };
services.pcscd.enable = true; services.pcscd.enable = true;
networking.domain = lib.mkDefault "services.privatevoid.net"; networking.domain = lib.mkDefault "${host.enterprise.subdomain or "services"}.${orgDomain}";
networking.search = [ config.networking.domain "search.privatevoid.net" ]; networking.search = [ config.networking.domain "search.${orgDomain}" ];
} }