diff options
author | Minijackson <minijackson@riseup.net> | 2023-09-24 09:51:26 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2023-09-24 10:13:05 +0200 |
commit | 6c7e768420039f5757c6ef4999f267ec18492c90 (patch) | |
tree | 21f170eb594eaf4d73231b468f5b35b042fa3662 /nixos | |
parent | 397b1733f45dc601e82ab9e13d5d427167fc284e (diff) | |
download | nixlib-6c7e768420039f5757c6ef4999f267ec18492c90.tar nixlib-6c7e768420039f5757c6ef4999f267ec18492c90.tar.gz nixlib-6c7e768420039f5757c6ef4999f267ec18492c90.tar.bz2 nixlib-6c7e768420039f5757c6ef4999f267ec18492c90.tar.lz nixlib-6c7e768420039f5757c6ef4999f267ec18492c90.tar.xz nixlib-6c7e768420039f5757c6ef4999f267ec18492c90.tar.zst nixlib-6c7e768420039f5757c6ef4999f267ec18492c90.zip |
netbox_3_5: introduce alias
clears up ambiguity use that alias in tests Co-authored-by: Raito Bezarius <masterancpp@gmail.com>
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-apps/netbox.nix | 4 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 2 | ||||
-rw-r--r-- | nixos/tests/web-apps/netbox-upgrade.nix | 7 |
3 files changed, 7 insertions, 6 deletions
diff --git a/nixos/modules/services/web-apps/netbox.nix b/nixos/modules/services/web-apps/netbox.nix index 6d89ffc2a7b7..067e58854388 100644 --- a/nixos/modules/services/web-apps/netbox.nix +++ b/nixos/modules/services/web-apps/netbox.nix @@ -74,9 +74,9 @@ in { package = lib.mkOption { type = lib.types.package; - default = if lib.versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox else pkgs.netbox_3_3; + default = if lib.versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox_3_5 else pkgs.netbox_3_3; defaultText = lib.literalExpression '' - if versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox else pkgs.netbox_3_3; + if versionAtLeast config.system.stateVersion "23.05" then pkgs.netbox_3_5 else pkgs.netbox_3_3; ''; description = lib.mdDoc '' NetBox package to use. diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index a9bac3346b90..8880f42f66e6 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -529,7 +529,7 @@ in { netdata = handleTest ./netdata.nix {}; networking.networkd = handleTest ./networking.nix { networkd = true; }; networking.scripted = handleTest ./networking.nix { networkd = false; }; - netbox = handleTest ./web-apps/netbox.nix { inherit (pkgs) netbox; }; + netbox_3_5 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_5; }; netbox_3_3 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_3; }; netbox-upgrade = handleTest ./web-apps/netbox-upgrade.nix {}; # TODO: put in networking.nix after the test becomes more complete diff --git a/nixos/tests/web-apps/netbox-upgrade.nix b/nixos/tests/web-apps/netbox-upgrade.nix index 602cf8d889d4..6b61d14d32ca 100644 --- a/nixos/tests/web-apps/netbox-upgrade.nix +++ b/nixos/tests/web-apps/netbox-upgrade.nix @@ -1,10 +1,11 @@ import ../make-test-python.nix ({ lib, pkgs, ... }: let oldNetbox = pkgs.netbox_3_3; + newNetbox = pkgs.netbox_3_5; in { name = "netbox-upgrade"; meta = with lib.maintainers; { - maintainers = [ minijackson ]; + maintainers = [ minijackson raitobezarius ]; }; nodes.machine = { config, ... }: { @@ -32,7 +33,7 @@ in { networking.firewall.allowedTCPPorts = [ 80 ]; - specialisation.upgrade.configuration.services.netbox.package = lib.mkForce pkgs.netbox; + specialisation.upgrade.configuration.services.netbox.package = lib.mkForce newNetbox; }; testScript = { nodes, ... }: @@ -43,7 +44,7 @@ in { (lib.concatStringsSep ".") ]; oldApiVersion = apiVersion oldNetbox.version; - newApiVersion = apiVersion pkgs.netbox.version; + newApiVersion = apiVersion newNetbox.version; in '' start_all() |