NetBox: Difference between revisions

m With Transport encryption: forget to add 443 at with TLS encryption
Felbinger (talk | contribs)
m plugins: fix newline
 
(8 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 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; currently about half of the existing NetBox plugins are packaged there. Until 26.05 these plugins are available as part of [https://search.nixos.org/packages?type=packages&query=python3Packages+netbox python3Packages]. Since 26.05 plugins can be found in the [https://search.nixos.org/packages?type=packages&query=netboxPlugins. netboxPlugins]  package set. 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]]