REWRITE
This commit is contained in:
@@ -23,7 +23,7 @@ let
|
||||
in
|
||||
{
|
||||
options.homey.eurovote = {
|
||||
enable = lib.mkEnableOption "Eurovision Vote app";
|
||||
enable = lib.mkEnableOption "Eurovision Vote app" // { default = true; };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -48,6 +48,34 @@ in
|
||||
logoutRedirectUrl = "https://auth.${domain}/logout";
|
||||
};
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Caddy virtual host — forward_auth; X-Remote-User passed to Django's
|
||||
# RemoteUserMiddleware for automatic SSO login
|
||||
# -----------------------------------------------------------------------
|
||||
homey.caddy.virtualHosts = [{
|
||||
subdomain = "eurovision-vote";
|
||||
port = 8007;
|
||||
auth = true;
|
||||
extraConfig = ''
|
||||
reverse_proxy localhost:8007 {
|
||||
header_up X-Remote-User {http.request.header.Remote-User}
|
||||
}
|
||||
'';
|
||||
extraHttpConfig = ''
|
||||
reverse_proxy localhost:8007 {
|
||||
header_up X-Forwarded-Proto https
|
||||
header_up X-Remote-User {http.request.header.Remote-User}
|
||||
}
|
||||
'';
|
||||
}];
|
||||
|
||||
# Eurovision Vote uses DynamicUser + /var/lib/eurovote — no extraDirs needed.
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Backup — /var/lib/eurovote holds the SQLite DB with votes
|
||||
# -----------------------------------------------------------------------
|
||||
homey.backup.extraPaths = [ "/var/lib/eurovote" ];
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Uptime Kuma monitor
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user