config/roles/authentik.nix

47 lines
819 B
Nix
Raw Normal View History

2025-02-05 21:08:52 +01:00
{
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 = { };
};
};
}