ldap: first attempt at ldap
This commit is contained in:
parent
fbbefc1e2a
commit
53696c927e
3 changed files with 198 additions and 0 deletions
55
machines/kitt.nix
Normal file
55
machines/kitt.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
|
||||
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, ... }: ip_address:
|
||||
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 = [
|
||||
# required imports
|
||||
../applications/firewall.nix
|
||||
../applications/dns.nix
|
||||
|
||||
# whats running on teh server
|
||||
../applications/ldap.nix
|
||||
];
|
||||
|
||||
deployment = {
|
||||
targetHost = hostname;
|
||||
targetPort = 22;
|
||||
targetUser = "root";
|
||||
};
|
||||
|
||||
# add this server to dns
|
||||
skynet_dns.records.external = [
|
||||
"${name} A ${ip_pub}"
|
||||
];
|
||||
|
||||
# we use this to pass in teh relevent infomation to the
|
||||
services.skynet_ldap = {
|
||||
enable = true;
|
||||
|
||||
host = {
|
||||
# pass in teh ip (used for firewall)
|
||||
ip = ip_pub;
|
||||
|
||||
# the name is used for dns
|
||||
name = name;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue