feat: Added authelia auth back to internal services

This commit is contained in:
uttarayan21
2025-08-02 04:56:49 +05:30
parent ccf73d7f82
commit f4204ab0fa
2 changed files with 10 additions and 18 deletions

View File

@@ -114,6 +114,13 @@
href = "https://photos.darksailor.dev"; href = "https://photos.darksailor.dev";
}; };
} }
{
"Excalidraw" = {
icon = "excalidraw.png";
description = "Excalidraw: Self-hosted Collaborative Whiteboard";
href = "https://draw.darksailor.dev";
};
}
]; ];
} }
]; ];

View File

@@ -12,11 +12,6 @@
}; };
}; };
services = { services = {
tailscaleAuth = {
enable = true;
user = config.services.caddy.user;
group = config.services.caddy.group;
};
caddy = { caddy = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
@@ -29,20 +24,10 @@
} }
} }
(auth) { (auth) {
forward_auth unix/${config.services.tailscaleAuth.socketPath} { forward_auth https://auth.darksailor.dev {
uri /auth uri /api/authz/forward-auth
header_up Remote-Addr {remote_host} copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
header_up Remote-Port {remote_port}
header_up Original-URI {uri}
copy_headers {
Tailscale-User>X-Webauth-User
Tailscale-Name>X-Webauth-Name
Tailscale-Login>X-Webauth-Login
Tailscale-Tailnet>X-Webauth-Tailnet
Tailscale-Profile-Picture>X-Webauth-Profile-Picture
}
} }
} }
''; '';
package = pkgs.caddy.withPlugins { package = pkgs.caddy.withPlugins {