added keycloak service
This commit is contained in:
parent
b3a3b7ee75
commit
fe5352b703
4 changed files with 46 additions and 4 deletions
|
|
@ -7,6 +7,11 @@
|
||||||
owner = "paperless";
|
owner = "paperless";
|
||||||
group = "hosted";
|
group = "hosted";
|
||||||
};
|
};
|
||||||
|
keycloakpg-pass = {
|
||||||
|
file = ../../../secrets/keycloakpg-pass.age;
|
||||||
|
owner = "user";
|
||||||
|
group = "hosted";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
@ -33,6 +38,24 @@
|
||||||
group = "hosted";
|
group = "hosted";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
keycloak = {
|
||||||
|
enable = true;
|
||||||
|
database = {
|
||||||
|
type = "postgresql";
|
||||||
|
createLocally = true;
|
||||||
|
username = "keycloak";
|
||||||
|
passwordFile = config.age.secrets.keycloakpg-pass.path;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
hostname = "baduhai.me";
|
||||||
|
http-relative-path = "/cloak";
|
||||||
|
http-port = lib.toInt "${config.ports.keycloak}";
|
||||||
|
proxy = "passthrough";
|
||||||
|
http-enabled = true;
|
||||||
|
initialAdminPassword = "changeme";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
minecraft-server = {
|
minecraft-server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
eula = true;
|
eula = true;
|
||||||
|
|
@ -57,7 +80,13 @@
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; root = inputs.homepage; };
|
"baduhai.me" = {
|
||||||
|
useACMEHost = "baduhai.me";
|
||||||
|
forceSSL = true;
|
||||||
|
kTLS = true;
|
||||||
|
root = inputs.homepage;
|
||||||
|
locations."/cloak/".proxyPass = "http://127.0.0.1:${config.ports.keycloak}/cloak/";
|
||||||
|
};
|
||||||
"bazarr.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.bazaar}"; };
|
"bazarr.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.bazaar}"; };
|
||||||
"bitwarden.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.vaultwarden}"; };
|
"bitwarden.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.vaultwarden}"; };
|
||||||
"cinny.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.cinny}"; };
|
"cinny.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.cinny}"; };
|
||||||
|
|
@ -73,8 +102,8 @@
|
||||||
"sonarr.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.sonarr}"; };
|
"sonarr.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.sonarr}"; };
|
||||||
"sync.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.syncthing}"; };
|
"sync.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.syncthing}"; };
|
||||||
"whoogle.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.whoogle}"; };
|
"whoogle.baduhai.me" = { useACMEHost = "baduhai.me"; forceSSL = true; kTLS = true; locations."/".proxyPass = "http://127.0.0.1:${config.ports.whoogle}"; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
paperless = {
|
paperless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -88,6 +117,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postgresql.enable = true;
|
||||||
|
|
||||||
qbittorrent = {
|
qbittorrent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "user";
|
user = "user";
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ in
|
||||||
jellyfin = mkStringOption "8096";
|
jellyfin = mkStringOption "8096";
|
||||||
whoogle = mkStringOption "8007";
|
whoogle = mkStringOption "8007";
|
||||||
qbittorrent = mkStringOption "8008";
|
qbittorrent = mkStringOption "8008";
|
||||||
|
keycloak = mkStringOption "8009";
|
||||||
sonarr = mkStringOption "8989";
|
sonarr = mkStringOption "8989";
|
||||||
jackett = mkStringOption "9117";
|
jackett = mkStringOption "9117";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
9
secrets/keycloakpg-pass.age
Normal file
9
secrets/keycloakpg-pass.age
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 SP9f6A DH+OPIjNpoPzAR2lBcWK6pGxLxVOT5GYO+cv8RFiShY
|
||||||
|
tYmZD4rjyyZ7f+AKO7F4awGhkMTaMtLy/m2GixEKoD0
|
||||||
|
-> ssh-ed25519 J6tVTA t+dbGkgho9+2EVD0e1E6wpHYX4LkoeOOckrIv3IjrhA
|
||||||
|
Rp2W2+AzY55aFLiHuyDf2sX5aKm2lKV2b2oWBxdia3c
|
||||||
|
-> =]sa>-grease _0gk(L an-* 0=Q"|=
|
||||||
|
sVKQXYirZvI
|
||||||
|
--- JGBE8D8b1ji7xqeoF2stjMAWR/JsIWTEPFbhCx4n+Sg
|
||||||
|
²BK”jd)~O¥-·t§¦ìQ;¼ÅÑžØÁ™Kúá6bóBN ÑÓÉlD<6C>è÷Û=^Ó¢àܪä=YH
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
let
|
let
|
||||||
io = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCIrKJk5zWzWEHvLMPMK8T3PyeBjsCsqzxPN+OrXfhA";
|
io = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCIrKJk5zWzWEHvLMPMK8T3PyeBjsCsqzxPN+OrXfhA";
|
||||||
desktops = [ io ];
|
desktops = [ io ];
|
||||||
|
|
||||||
alexandria = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK95QueW+jp1ZmF299Xr3XkgHJ6dL7aZVsfWxqbOKVKA";
|
alexandria = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK95QueW+jp1ZmF299Xr3XkgHJ6dL7aZVsfWxqbOKVKA";
|
||||||
servers = [ alexandria ];
|
servers = [ alexandria ];
|
||||||
|
|
||||||
all-hosts = desktops ++ servers;
|
all-hosts = desktops ++ servers;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"cloudflare-creds.age".publicKeys = all-hosts;
|
"cloudflare-creds.age".publicKeys = all-hosts;
|
||||||
|
"keycloakpg-pass.age".publicKeys = all-hosts;
|
||||||
"paperless-pass.age".publicKeys = all-hosts;
|
"paperless-pass.age".publicKeys = all-hosts;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue