2023-09-14 23:52:20 +02:00
|
|
|
# Sources for this configuration:
|
|
|
|
# - https://docs.netbox.dev/en/stable/configuration/
|
|
|
|
# - https://colmena.cli.rs/unstable/features/keys.html
|
|
|
|
# - https://colmena.cli.rs/unstable/reference/deployment.html
|
|
|
|
# - https://git.grzb.de/yuri/nix-infra/-/blob/33f2d9e324c2e3a8b1b41c20bce239001bcce9fc/hosts/netbox/secrets.nix
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.netbox = {
|
|
|
|
enable = true;
|
2023-12-01 21:53:58 +01:00
|
|
|
package = pkgs.netbox;
|
2024-05-26 03:14:31 +02:00
|
|
|
secretKeyFile = "/run/secrets/netbox_secret_key";
|
2023-09-14 23:52:20 +02:00
|
|
|
settings = {
|
2023-09-21 19:09:28 +02:00
|
|
|
ALLOWED_HOSTS = [ "netbox.hamburg.ccc.de" ];
|
2023-09-14 23:52:20 +02:00
|
|
|
SESSION_COOKIE_SECURE = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-26 03:14:31 +02:00
|
|
|
sops.secrets."netbox_secret_key" = {
|
|
|
|
mode = "0440";
|
|
|
|
owner = "netbox";
|
2023-09-14 23:52:20 +02:00
|
|
|
group = "netbox";
|
2024-05-26 03:14:31 +02:00
|
|
|
restartUnits = [ "netbox.service" ];
|
2023-09-14 23:52:20 +02:00
|
|
|
};
|
|
|
|
}
|