Compare commits
4 Commits
b28e5da9c2
...
main
Author | SHA1 | Date | |
---|---|---|---|
07bc352954
|
|||
e66d655997
|
|||
79e7214c99
|
|||
e12545bf37
|
@ -19,4 +19,9 @@
|
|||||||
./postgres.nix
|
./postgres.nix
|
||||||
./security
|
./security
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nix.settings = {
|
||||||
|
cores = 2;
|
||||||
|
max-jobs = 4;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,50 +3,31 @@ let
|
|||||||
port = 8086;
|
port = 8086;
|
||||||
domain = "beta.auth.${common.domain}";
|
domain = "beta.auth.${common.domain}";
|
||||||
dbPassKey = "keycloak/database-pass";
|
dbPassKey = "keycloak/database-pass";
|
||||||
cfg = config.services.keycloak;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
keycloak = {
|
keycloak = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
hostname = domain;
|
hostname = "https://${domain}";
|
||||||
http-port = port;
|
http-port = port;
|
||||||
http-enabled = true;
|
http-enabled = true;
|
||||||
};
|
};
|
||||||
database = {
|
database = {
|
||||||
type = "postgresql";
|
type = "postgresql";
|
||||||
createLocally = false;
|
createLocally = true;
|
||||||
host = "localhost";
|
|
||||||
port = config.services.postgresql.settings.port;
|
port = config.services.postgresql.settings.port;
|
||||||
name = "keycloak";
|
|
||||||
username = "keycloak";
|
|
||||||
passwordFile = config.sops.secrets.${dbPassKey}.path;
|
passwordFile = config.sops.secrets.${dbPassKey}.path;
|
||||||
useSSL = false;
|
|
||||||
};
|
};
|
||||||
|
initialAdminPassword = "changeme";
|
||||||
};
|
};
|
||||||
|
|
||||||
nginx.virtualHosts."${domain}" = {
|
nginx.virtualHosts.${domain} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations = {
|
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||||
"/".proxyPass = "http://localhost:${toString port}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
postgresql =
|
|
||||||
let
|
|
||||||
psql = cfg.database;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
ensureDatabases = [ psql.name ];
|
|
||||||
ensureUsers = [
|
|
||||||
{
|
|
||||||
name = psql.username;
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
sops.secrets.${dbPassKey} = { };
|
sops.secrets.${dbPassKey} = { };
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ in
|
|||||||
|
|
||||||
services = {
|
services = {
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
enable = true;
|
enable = false;
|
||||||
|
|
||||||
autoUpdateApps.enable = true;
|
autoUpdateApps.enable = true;
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ in
|
|||||||
"track.${domain}" = homelabProxy 8090;
|
"track.${domain}" = homelabProxy 8090;
|
||||||
# Donetick
|
# Donetick
|
||||||
"chore.${domain}" = homelabProxy 2021;
|
"chore.${domain}" = homelabProxy 2021;
|
||||||
|
"recurring-events-api.${domain}" = homelabProxy 8095;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user