mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
netbox_3_3: init
reintroduce previous version, use in NixOS module if stateVersion < 23.05
This commit is contained in:
parent
6e054138b0
commit
78eb4d64e7
7 changed files with 203 additions and 3 deletions
|
@ -14,7 +14,7 @@ let
|
|||
};
|
||||
configFile = pkgs.concatText "configuration.py" [ settingsFile extraConfigFile ];
|
||||
|
||||
pkg = (pkgs.netbox.overrideAttrs (old: {
|
||||
pkg = (cfg.package.overrideAttrs (old: {
|
||||
installPhase = old.installPhase + ''
|
||||
ln -s ${configFile} $out/opt/netbox/netbox/netbox/configuration.py
|
||||
'' + optionalString cfg.enableLdap ''
|
||||
|
@ -74,6 +74,17 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = if versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox else pkgs.netbox_3_3;
|
||||
defaultText = literalExpression ''
|
||||
if versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox else pkgs.netbox_3_3;
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
NetBox package to use.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8001;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue