Add authentik
parent
b9d6ff7e10
commit
a3d887ef8d
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
name = "Authentik";
|
||||||
|
description = ''
|
||||||
|
SSO provider
|
||||||
|
'';
|
||||||
|
|
||||||
|
traefikRoutes =
|
||||||
|
{
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
hostname = host.hostname;
|
||||||
|
config = host.config.authentik;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name = "${hostname}-authentik";
|
||||||
|
rule = "Host(`${config.domain}`)";
|
||||||
|
# TODO: Change port
|
||||||
|
target = "http://${host.ip}:PORTHERE";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
nixosModule =
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
options.authentik = {
|
||||||
|
domain = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# Enable the sonarr service
|
||||||
|
services.sonarr = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
group = "media";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Ensure that the media group exists
|
||||||
|
users.groups.media = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,4 +5,5 @@
|
||||||
{
|
{
|
||||||
sonarr = utils.mkRole (import ./sonarr.nix);
|
sonarr = utils.mkRole (import ./sonarr.nix);
|
||||||
traefik = utils.mkRole (import ./traefik.nix);
|
traefik = utils.mkRole (import ./traefik.nix);
|
||||||
|
authentik = utils.mkRole (import ./authentik.nix);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{
|
{
|
||||||
options.sonarr = {
|
options.sonarr = {
|
||||||
domain = lib.mkOption {
|
domain = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue