Authentik initial setup

This commit is contained in:
Rolf Martin Glomsrud 2025-04-03 20:53:28 +02:00
parent 419461db50
commit a38f4d30a2
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,25 @@
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
nginx
authentik
];
services.authentik = {
enable = true;
# The environmentFile needs to be on the target host!
# Best use something like sops-nix or agenix to manage it
environmentFile = "/run/secrets/authentik/authentik-env";
settings = {
#email = {
# host = "smtp.example.com";
# port = 587;
# username = "authentik@example.com";
# use_tls = true;
# use_ssl = false;
# from = "authentik@example.com";
#};
disable_startup_analytics = true;
avatars = "initials";
};
};
}

View file

@ -4,6 +4,13 @@
inputs = { inputs = {
# NixOS official package source, using the nixos-24.11 branch here # NixOS official package source, using the nixos-24.11 branch here
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
authentik-nix = {
url = "github:nix-community/authentik-nix";
## optional overrides. Note that using a different version of nixpkgs can cause issues, especially with python dependencies
# inputs.nixpkgs.follows = "nixpkgs"
# inputs.flake-parts.follows = "flake-parts"
};
}; };
outputs = { self, nixpkgs, ... }@inputs: { outputs = { self, nixpkgs, ... }@inputs: {