47 lines
819 B
Nix
47 lines
819 B
Nix
{
|
|
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 = { };
|
|
};
|
|
};
|
|
}
|