feat: Added authelia auth back to internal services
This commit is contained in:
@@ -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";
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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,21 +24,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
(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 {
|
||||||
plugins = ["github.com/caddy-dns/hetzner@v1.0.0"];
|
plugins = ["github.com/caddy-dns/hetzner@v1.0.0"];
|
||||||
|
|||||||
Reference in New Issue
Block a user