depot/cluster/services/idm/default.nix

64 lines
1.4 KiB
Nix
Raw Normal View History

2023-08-31 01:55:45 +03:00
{ config, depot, ... }:
2023-06-10 18:54:03 +03:00
{
2023-06-11 22:33:53 +03:00
links = {
idm = {
2023-08-31 01:55:45 +03:00
ipv4 = "idm.${depot.lib.meta.domain}";
2023-06-11 22:33:53 +03:00
port = 443;
protocol = "https";
};
ldap = {
2023-08-31 01:55:45 +03:00
hostname = "idm-ldap.internal.${depot.lib.meta.domain}";
2023-06-11 22:33:53 +03:00
ipv4 = config.vars.mesh.VEGAS.meshIp;
port = 636;
protocol = "ldaps";
};
2023-06-10 18:54:03 +03:00
};
services.idm = {
nodes = {
server = [ "VEGAS" ];
client = [ "checkmate" "grail" "VEGAS" "prophet" "soda" "thunderskin" ];
client-soda = [ "soda" ];
2023-06-10 18:54:03 +03:00
};
nixos = {
server = [
./common.nix
./server.nix
];
2023-06-11 03:00:46 +03:00
client = [
./common.nix
2023-06-11 03:00:46 +03:00
./client.nix
./modules/idm-nss-ready.nix
./modules/idm-tmpfiles.nix
2023-06-11 03:00:46 +03:00
./policies/infra-admins.nix
];
client-soda = [
./policies/soda.nix
];
2023-06-10 18:54:03 +03:00
};
secrets.serviceAccountCredentials = {
nodes = config.services.idm.nodes.client;
shared = false;
};
2023-06-10 18:54:03 +03:00
};
2023-12-04 00:04:15 +02:00
dns.records = let
serverAddrsPublic = map
(node: depot.hours.${node}.interfaces.primary.addrPublic)
config.services.idm.nodes.server;
serverAddrsInternal = map
(node: config.vars.mesh.${node}.meshIp)
config.services.idm.nodes.server;
in {
idm = {
type = "A";
target = serverAddrsPublic;
};
"idm-ldap.internal" = {
type = "A";
target = serverAddrsInternal;
};
};
2023-06-10 18:54:03 +03:00
}