feat(venus): add keycloak

This commit is contained in:
Michael Thomas 2024-04-16 17:11:04 -04:00
parent 440fd28d28
commit d90a4fb372
3 changed files with 33 additions and 0 deletions

View File

@ -10,6 +10,12 @@
networking.hostName = "venus"; # Define your hostname. networking.hostName = "venus"; # Define your hostname.
networking.nameservers = ["1.1.1.1" "8.8.8.8"]; networking.nameservers = ["1.1.1.1" "8.8.8.8"];
networking.firewall = {
enable = true;
interfaces."wg0" = {
allowedTCPPorts = [7654];
};
};
# Wireguard tunnel to oracle # Wireguard tunnel to oracle
age.secrets.wireguardThinkcentre.file = ../../secrets/wireguard-thinkcentre.age; age.secrets.wireguardThinkcentre.file = ../../secrets/wireguard-thinkcentre.age;
@ -63,6 +69,23 @@
}; };
}; };
age.secrets.keycloakDb.file = ../../secrets/keycloak-db.age;
services.keycloak = {
enable = true;
settings = {
hostname-url = "https://auth.s.michaelt.xyz";
hostname-admin-url = "https://auth.s.michaelt.xyz";
hostname-strict = false;
hostname-strict-https = false;
# proxy-headers = "xforwarded";
proxy = "edge";
http-enabled = true;
http-port = 7654;
# https-port = -1;
};
database.passwordFile = config.age.secrets.keycloakDb.path;
};
swapDevices = [ swapDevices = [
{ {
device = "/swapfile"; device = "/swapfile";

6
secrets/keycloak-db.age Normal file
View File

@ -0,0 +1,6 @@
age-encryption.org/v1
-> ssh-ed25519 jBnYqQ 0cD5v5l7JGQmlnM0q7J8VDWrObgphnv3OqSu94BWKUk
XcFJF3Z7bJq87/dbwejxvNWlyXCpXAG8zFsdccP25/Y
--- HfE3zlQE++CyJhcsZ2v9u+lwgdUmNq07ujxK9fqHEfk
盃?<3F>螙Z莼绣u<E7BBA3>v|馰婡坏s詂趠丿滻i歳靾g溻应頂吾 蹻唆
{<7B><>砪@橻$<24>

View File

@ -3,6 +3,10 @@ let
oracle = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0vHE/b6tKk6I6DwEemIF5VdS/JBXW8eiYIBmnbv5LI root@oracle"; oracle = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0vHE/b6tKk6I6DwEemIF5VdS/JBXW8eiYIBmnbv5LI root@oracle";
# systems = [system1]; # systems = [system1];
in { in {
# Venus
"wireguard-thinkcentre.age".publicKeys = [venus]; "wireguard-thinkcentre.age".publicKeys = [venus];
"keycloak-db.age".publicKeys = [venus];
# Oracle
"wireguard-oracle.age".publicKeys = [oracle]; "wireguard-oracle.age".publicKeys = [oracle];
} }