My Nix Configuration

[marvin.services] pocket-id: 1.0 config migration

pyrox.dev a57dcdb5 ca84d4e5

verified
Changed files
+4 -23
lib
systems
x86_64-linux
marvin
services
prefect
services
-2
lib/data/services.toml
···
host = "marvin"
extUrl = "auth.pyrox.dev"
anubis = 8401
-
be-port = 30101
-
be-anubis = 30102
[redlib]
+3 -12
systems/x86_64-linux/marvin/services/pocket-id.nix
···
enable = true;
environmentFile = config.age.secrets.pocket-id-secrets.path;
settings = {
-
PUBLIC_APP_URL = "https://auth.pyrox.dev";
+
APP_URL = "https://${d.extUrl}";
TRUST_PROXY = true;
UPDATE_CHECK_DISABLED = true;
-
BACKEND_PORT = 30101;
PORT = d.port;
-
INTERNAL_BACKEND_URL = "http://localhost:30101";
# Frontend Config
-
PUBLIC_UI_CONFIG_DISABLED = true;
+
UI_CONFIG_DISABLED = true;
APP_NAME = "dishNet Auth";
SESSION_DURATION = 120;
EMAILS_VERIFIED = true;
···
group = "pocket-id";
};
services.anubis.instances = {
-
pocket-id-fe = {
+
pocket-id = {
settings = {
BIND = ":${toString d.anubis}";
POLICY_FNAME = "${pkgs.py.anubis-files}/policies/pocket-id.yaml";
TARGET = "http://localhost:${toString d.port}";
-
};
-
};
-
pocket-id-be = {
-
settings = {
-
BIND = ":${toString d.be-anubis}";
-
POLICY_FNAME = "${pkgs.py.anubis-files}/policies/pocket-id.yaml";
-
TARGET = "http://localhost:${toString d.be-port}";
};
};
};
+1 -9
systems/x86_64-linux/prefect/services/caddy.nix
···
# Authentication
${pns.pocket-id.extUrl} = {
extraConfig = ''
-
reverse_proxy /api/* ${marvin}:${toString pns.pocket-id.be-port} {
-
header_up X-Real-IP {remote_host}
-
header_up X-Http-Version {http.request.proto}
-
}
-
reverse_proxy /.well-known/* ${marvin}:${toString pns.pocket-id.be-port} {
-
header_up X-Real-IP {remote_host}
-
header_up X-Http-Version {http.request.proto}
-
}
-
reverse_proxy /* ${marvin}:${toString pns.pocket-id.port} {
+
reverse_proxy / ${marvin}:${toString pns.pocket-id.anubis} {
header_up X-Real-IP {remote_host}
header_up X-Http-Version {http.request.proto}
}