forked from CCCHH/nix-infra
Configure NetBox
This commit is contained in:
parent
e0c7180ecf
commit
2e3e8c7031
6 changed files with 121 additions and 1 deletions
29
config/hosts/netbox/netbox.nix
Normal file
29
config/hosts/netbox/netbox.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
# 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;
|
||||
secretKeyFile = "/secrets/netbox-secret-key.secret";
|
||||
settings = {
|
||||
ALLOWED_HOSTS = [ "netbox.ccchh.net" "10.31.208.29" ];
|
||||
SESSION_COOKIE_SECURE = true;
|
||||
};
|
||||
};
|
||||
|
||||
deployment.keys."netbox-secret-key.secret" = {
|
||||
keyCommand = [ "env" "pass" "noc/vm-secrets/z9/netbox/netbox_secret_key" ];
|
||||
|
||||
destDir = "/secrets";
|
||||
user = "netbox";
|
||||
group = "netbox";
|
||||
permissions = "0440";
|
||||
|
||||
uploadAt = "pre-activation";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue