feat: simplified the config for running services, only one hosts config is required now in each server config file
This commit is contained in:
parent
f8c7860eb5
commit
379cb84839
34 changed files with 200 additions and 581 deletions
|
@ -21,16 +21,6 @@ in {
|
|||
options.services.skynet."${name}" = {
|
||||
enable = mkEnableOption "Skynet LDAP backend server";
|
||||
|
||||
host = {
|
||||
ip = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
domain = {
|
||||
tld = mkOption {
|
||||
type = types.str;
|
||||
|
@ -65,7 +55,7 @@ in {
|
|||
{
|
||||
record = cfg.domain.sub;
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
value = config.services.skynet.host.name;
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ in {
|
|||
../acme.nix
|
||||
../dns.nix
|
||||
../nginx.nix
|
||||
./backend.nix
|
||||
];
|
||||
|
||||
options.services.skynet."${name}" = {
|
||||
|
@ -26,16 +25,6 @@ in {
|
|||
|
||||
enable = mkEnableOption "Skynet LDAP service";
|
||||
|
||||
host = {
|
||||
ip = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
domain = {
|
||||
tld = mkOption {
|
||||
type = types.str;
|
||||
|
@ -65,13 +54,6 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# passthrough to the backend
|
||||
services.skynet.ldap_backend = {
|
||||
enable = true;
|
||||
host.ip = cfg.host.ip;
|
||||
host.name = cfg.host.name;
|
||||
};
|
||||
|
||||
# after changing teh password openldap.service has to be restarted
|
||||
age.secrets.ldap_pw = {
|
||||
file = ../../secrets/ldap/pw.age;
|
||||
|
@ -88,7 +70,7 @@ in {
|
|||
{
|
||||
record = cfg.domain.sub;
|
||||
r_type = "CNAME";
|
||||
value = cfg.host.name;
|
||||
value = config.services.skynet.host.name;
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue