Ensure database exists before starting kdc init
This commit is contained in:
@@ -52,22 +52,14 @@ in {
|
||||
config = {
|
||||
# All Fudo hosts should redirect selby.ca to the selbyhomecentre website.
|
||||
services.nginx.virtualHosts = {
|
||||
"selby.ca" = {
|
||||
enableACME = true;
|
||||
locations."/".return = "301 https://selbyhomecentre.com$request_uri";
|
||||
};
|
||||
"www.selby.ca" = {
|
||||
enableACME = true;
|
||||
locations."/".return = "301 https://selbyhomecentre.com$request_uri";
|
||||
};
|
||||
"selbyhomecentre.com" = {
|
||||
enableACME = true;
|
||||
locations."/".return = "301 https://selbyhomecentre.com$request_uri";
|
||||
};
|
||||
"www.selbyhomecentre.com" = {
|
||||
enableACME = true;
|
||||
locations."/".return = "301 https://selbyhomecentre.com$request_uri";
|
||||
};
|
||||
"selby.ca".locations."/".return =
|
||||
"301 https://selbyhomecentre.com$request_uri";
|
||||
"www.selby.ca".locations."/".return =
|
||||
"301 https://selbyhomecentre.com$request_uri";
|
||||
"selbyhomecentre.com".locations."/".return =
|
||||
"301 https://selbyhomecentre.com$request_uri";
|
||||
"www.selbyhomecentre.com".locations."/".return =
|
||||
"301 https://selbyhomecentre.com$request_uri";
|
||||
};
|
||||
|
||||
fudo.services = {
|
||||
@@ -88,7 +80,7 @@ in {
|
||||
};
|
||||
"selby.ca" = {
|
||||
default-host = "germany";
|
||||
ksk = config.fudo.secrets.files.dns.key-signing-keys."selby.ca";
|
||||
ksk = null;
|
||||
};
|
||||
"selbyhomecentre.com" = {
|
||||
default-host = "germany";
|
||||
|
||||
@@ -23,9 +23,9 @@ in {
|
||||
prefixLength = 28;
|
||||
}];
|
||||
};
|
||||
firewall.enable = {
|
||||
firewall = {
|
||||
enable = false;
|
||||
interface.podman0.allowedUDPPorts = [ 53 ];
|
||||
interfaces.podman0.allowedUDPPorts = [ 53 ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -90,13 +90,16 @@ in {
|
||||
];
|
||||
description = "Initialize and update the Heimdal KDC database.";
|
||||
path = with pkgs; [ kdcMergePrincipals coreutils ];
|
||||
serviceConfig = {
|
||||
serviceConfig = let
|
||||
db = config.fudo.auth.kerberos.kdc.database;
|
||||
principals = host-secrets.kdc-principals.target-file;
|
||||
master-key = host-secrets.realm-master-key.target-file;
|
||||
in {
|
||||
User = krb-user;
|
||||
Group = krb-group;
|
||||
Restart = "always";
|
||||
ConditionPathExists = [ db principals master-key ];
|
||||
ExecStart = let
|
||||
db = config.fudo.auth.kerberos.kdc.database;
|
||||
principals = host-secrets.kdc-principals.target-file;
|
||||
master-key = host-secrets.realm-master-key.target-file;
|
||||
init-db-cmd = concatStringsSep " " [
|
||||
"${pkgs.kdcMergePrincipals}/bin/kdc-merge-principals"
|
||||
"--create"
|
||||
|
||||
Reference in New Issue
Block a user