fix(network): uqdn

This commit is contained in:
Kat Inskip 2022-09-26 08:52:51 -07:00
parent d1dc6a0e72
commit 58992ff283
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
6 changed files with 53 additions and 36 deletions

View file

@ -1,7 +1,7 @@
{ config, pkgs, lib, tf, ... }: with lib; let
id = tf.acme.certs."auth.kittywit.ch".out.resource.getAttr "id";
in {
services.keycloak = {
services.keycloak = lib.mkIf (tf.state.enable) {
enable = builtins.getEnv "CI_PLATFORM" == "impure";
package = (pkgs.keycloak.override {
jre = pkgs.openjdk11;
@ -33,12 +33,12 @@ in {
members = [ "keycloak" "openldap" ];
};
systemd.services.keycloak.script = lib.mkBefore ''
systemd.services.keycloak.script = lib.mkIf (tf.state.enable) (lib.mkBefore ''
mkdir -p /run/keycloak
if [[ ! -e /run/keycloak/${id}.jks ]]; then
${pkgs.adoptopenjdk-jre-bin}/bin/keytool -import -alias auth.kittywit.ch -noprompt -keystore /run/keycloak/${id}.jks -keypass ${id} -storepass ${id} -file ${config.domains.kittywitch-keycloak.cert_path}
fi
'';
'');
users.groups.keycloak = { };

View file

@ -71,5 +71,6 @@
network = "internet";
type = "cname";
domain = "vault";
zone = "kittywit.ch.";
};
}