NetBox: Difference between revisions

- added encryption configuration - added Troubleshooting information - fixed some minor bugs in the basic configuration description
Klinger (talk | contribs)
m added a sentence about what it is, added 2 categories Server and Web Applications
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[https://netbox.dev/ {{PAGENAME}}] is available as a [[module]].
[https://netbox.dev/ {{PAGENAME}}] is a network infrastructure documentation tool. It is a web application and this [[Module]] can be installed and configured via several options.  
== Setup ==
== Setup ==


Line 34: Line 34:
         "/" = {
         "/" = {
           proxyPass = "http://[::1]:8001";
           proxyPass = "http://[::1]:8001";
           # proxyPass = "http://${config.services.netbox.listenAddress}:${config.services.netbox.port}";
           # proxyPass = "http://${config.services.netbox.listenAddress}:${toString config.services.netbox.port}";
         };
         };
         "/static/" = { alias = "${config.services.netbox.dataDir}/static/"; };
         "/static/" = { alias = "${config.services.netbox.dataDir}/static/"; };
Line 47: Line 47:
{ config, ... }: {
{ config, ... }: {


   networking.firewall.allowedTCPPorts = [ 80 ];
   networking.firewall.allowedTCPPorts = [ 80 443 ];


   services.netbox = {
   services.netbox = {
Line 65: Line 65:
         "/" = {
         "/" = {
           proxyPass = "http://[::1]:8001";
           proxyPass = "http://[::1]:8001";
           # proxyPass = "http://${config.services.netbox.listenAddress}:${config.services.netbox.port}";
           # proxyPass = "http://${config.services.netbox.listenAddress}:${toString config.services.netbox.port}";
         };
         };
         "/static/" = { alias = "${config.services.netbox.dataDir}/static/"; };
         "/static/" = { alias = "${config.services.netbox.dataDir}/static/"; };
Line 78: Line 78:


}  
}  
</syntaxhighlight>For more acme settings and further instruction, please look here [[Acme]].
</syntaxhighlight>For more acme settings and further instruction, please look here [[ACME]].


For more nginx settings and further instruction, please look here  [[Nginx|Nginx.]]
For more nginx settings and further instruction, please look here  [[Nginx|Nginx.]]
=== Plugins ===
The NixOS module supports plugins from nixpkgs. However, at the moment only a small set of plugins is packaged in nixpkgs and is available as part of [https://search.nixos.org/packages?type=packages&query=python3Packages+netbox python3Packages]. The documentation for plugins is being worked on and discussed in [https://github.com/NixOS/nixpkgs/issues/261522 #261522].
To include a plugin:<syntaxhighlight lang="nix">
{ pkgs, ... }: {
  services.netbox = {
    plugins = ps: with ps; [ ps.netbox-reorder-rack ];
    settings.PLUGINS = ["netbox_reorder_rack"];
  };
}
</syntaxhighlight>The plugin identifier for <source lang="nix" enclose="none">services.netbox.settings.PLUGINS</source> is usually contained in the official documentation for the plugin. It usually is slightly different from the package name.


=== Setup Superuser ===
=== Setup Superuser ===
Line 114: Line 126:
[[Category:Guide]]
[[Category:Guide]]
[[Category:Applications]]
[[Category:Applications]]
[[Category:Web Applications]]
[[Category:Server]]