nixos/machines/kitt.nix

59 lines
1 KiB
Nix

/*
Name: https://en.wikipedia.org/wiki/KITT
Why: Kitt used to have this role before (as well as email and dns)
Type: VM
Hardware: -
From: 2023
Role: LDAP Server
Notes:
*/
{ pkgs, lib, nodes, ... }:
let
# name of the server, sets teh hostname and record for it
name = "kitt";
ip_pub = "193.1.99.74";
ip_priv = "172.20.20.5";
hostname = "${name}.skynet.ie";
#hostname = ip_pub;
in {
imports = [
../applications/ldap.nix
];
deployment = {
targetHost = hostname;
targetPort = 22;
targetUser = "root";
tags = [ "active" ];
};
# add this server to dns
skynet_dns.records = {
external = [
"${name} A ${ip_pub}"
];
reverse = [
"${builtins.substring 9 3 ip_pub} IN PTR ${hostname}."
];
};
services.skynet_backup = {
host = {
ip = ip_pub;
name = name;
};
};
services.skynet_ldap = {
enable = true;
host = {
ip = ip_pub;
name = name;
};
};
}