Delete netbox service
This commit is contained in:
parent
d796b787b8
commit
8c2f113c55
3 changed files with 0 additions and 96 deletions
22
flake.nix
22
flake.nix
|
@ -170,28 +170,6 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
netbox = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = [
|
|
||||||
agenix.nixosModules.default
|
|
||||||
microvm.nixosModules.microvm
|
|
||||||
"${inputs.self}/systems"
|
|
||||||
"${inputs.self}/services"
|
|
||||||
{
|
|
||||||
services.vm_netbox = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
services.vm = {
|
|
||||||
enable = true;
|
|
||||||
hostname = "netbox";
|
|
||||||
vm_ip = "192.168.1.45";
|
|
||||||
vm_cpu = 2;
|
|
||||||
vm_mem = 2048;
|
|
||||||
macAddr = "02:00:00:00:00:45";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
authentik = nixpkgs.lib.nixosSystem {
|
authentik = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nginx
|
./nginx
|
||||||
./netbox
|
|
||||||
./gitea
|
./gitea
|
||||||
./forgejo-runner
|
./forgejo-runner
|
||||||
./redis
|
./redis
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.services.vm_netbox;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.services.vm_netbox = {
|
|
||||||
enable = lib.mkEnableOption "Enable minimal config";
|
|
||||||
db_ip = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "netbox database IP address";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.netbox = {
|
|
||||||
enable = true;
|
|
||||||
port = 8001;
|
|
||||||
settings = {
|
|
||||||
ALLOWED_HOSTS = [ "*" ];
|
|
||||||
DATABASE = lib.mkForce {
|
|
||||||
ENGINE = "django.db.backends.postgresql";
|
|
||||||
NAME = "netbox";
|
|
||||||
USER = "netbox";
|
|
||||||
PASSWORD = "Netbox43Zer!";
|
|
||||||
HOST = "192.168.1.13";
|
|
||||||
PORT = 5432;
|
|
||||||
CONN_MAX_AGE = 300;
|
|
||||||
};
|
|
||||||
REDIS = {
|
|
||||||
tasks = {
|
|
||||||
HOST = "192.168.1.16";
|
|
||||||
PORT = 6379;
|
|
||||||
USERNAME = "";
|
|
||||||
PASSWORD = "";
|
|
||||||
DATABASE = 0;
|
|
||||||
SSL = false;
|
|
||||||
};
|
|
||||||
caching = {
|
|
||||||
HOST = "192.168.1.16";
|
|
||||||
PORT = 6379;
|
|
||||||
USERNAME = "";
|
|
||||||
PASSWORD = "";
|
|
||||||
DATABASE = 1;
|
|
||||||
SSL = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
CSRF_COOKIE_NAME = "csrftoken";
|
|
||||||
CSRF_TRUSTED_ORIGINS = [
|
|
||||||
"http://192.168.1.40"
|
|
||||||
"https://netbox.le43.eu"
|
|
||||||
];
|
|
||||||
DEBUG = false;
|
|
||||||
};
|
|
||||||
secretKeyFile = "/run/secrets/netbox/keyFile";
|
|
||||||
};
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
user = "netbox";
|
|
||||||
clientMaxBodySize = "25m";
|
|
||||||
|
|
||||||
virtualHosts."192.168.1.45" = {
|
|
||||||
locations = {
|
|
||||||
"/" = {
|
|
||||||
proxyPass = "http://localhost:8001";
|
|
||||||
};
|
|
||||||
"/static/" = { alias = "${config.services.netbox.dataDir}/static/"; };
|
|
||||||
};
|
|
||||||
forceSSL = false;
|
|
||||||
enableACME = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 8001 ];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue