Loading nixos/tests/incus/ui.nix +9 −13 Original line number Diff line number Diff line Loading @@ -15,13 +15,15 @@ import ../make-test-python.nix ( nodes.machine = { lib, ... }: { virtualisation = { incus = { virtualisation.incus = { enable = true; package = if lts then pkgs.incus-lts else pkgs.incus; preseed.config."core.https_address" = ":8443"; ui.enable = true; }; incus.ui.enable = true; }; networking.nftables.enable = true; environment.systemPackages = Loading Loading @@ -63,16 +65,10 @@ import ../make-test-python.nix ( }; testScript = '' machine.wait_for_unit("sockets.target") machine.wait_for_unit("incus.service") machine.wait_for_file("/var/lib/incus/unix.socket") # Configure incus listen address machine.succeed("incus config set core.https_address :8443") machine.succeed("systemctl restart incus") # Check that the INCUS_UI environment variable is populated in the systemd unit machine.succeed("cat /etc/systemd/system/incus.service | grep 'INCUS_UI'") machine.succeed("systemctl cat incus.service | grep 'INCUS_UI'") # Ensure the endpoint returns an HTML page with 'Incus UI' in the title machine.succeed("curl -kLs https://localhost:8443/ui | grep '<title>Incus UI</title>'") Loading pkgs/by-name/in/incus-ui-canonical/package.nix +13 −13 Original line number Diff line number Diff line { lib, stdenv, fetchurl, fetchFromGitHub, fetchYarnDeps, nodejs, Loading @@ -9,32 +10,31 @@ nixosTests, git, }: let # this rarely changes https://github.com/zabbly/incus/blob/daily/patches/ui-canonical-renames.sed renamesSed = fetchurl { url = "https://raw.githubusercontent.com/zabbly/incus/0fa53811ff1043fd9f28c8b78851b60ca58e1b10/patches/ui-canonical-renames.sed"; hash = "sha256-f0vd/Xp/kBbZkg6CBM4cZPlwg5WUL/zv3mCAEmugzCE="; }; in stdenv.mkDerivation rec { pname = "incus-ui-canonical"; version = "0.14.6"; version = "0.15"; src = fetchFromGitHub { owner = "zabbly"; repo = "incus-ui-canonical"; tag = "incus-${version}"; hash = "sha256-An2mhIj3D2EdB1Bgnry1l2m6r/GIKTee4anSYNTq8B8="; tag = version; hash = "sha256-HqdaG51W7eUCGUhA+9pYrAWaA6qyK7Fc95CKJvk9GaA="; }; offlineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; hash = "sha256-dkATFNjAPhrPbXhcJ/R4eIpcagKEwBSnRfLwqTPIe6c="; }; zabbly = fetchFromGitHub { owner = "zabbly"; repo = "incus"; rev = "36714d7c38eb3cc3e4e821c7aed44e066e1e84ca"; hash = "sha256-H6gjXmwCv3oGXrzn1NENfgO3CWXMnmp94GdJv2Q8n0w="; hash = "sha256-O7oEAjmCEmPpsO/rdkZVhUkxhFzhHpPRbmci3yRBA7g="; }; patchPhase = '' sed -i -f "$zabbly/patches/ui-canonical-renames.sed" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts* find -type f -name "*.ts" -o -name "*.tsx" -o -name "*.scss" -o -name "*.html" | xargs sed -i -f ${renamesSed} ''; nativeBuildInputs = [ Loading Loading
nixos/tests/incus/ui.nix +9 −13 Original line number Diff line number Diff line Loading @@ -15,13 +15,15 @@ import ../make-test-python.nix ( nodes.machine = { lib, ... }: { virtualisation = { incus = { virtualisation.incus = { enable = true; package = if lts then pkgs.incus-lts else pkgs.incus; preseed.config."core.https_address" = ":8443"; ui.enable = true; }; incus.ui.enable = true; }; networking.nftables.enable = true; environment.systemPackages = Loading Loading @@ -63,16 +65,10 @@ import ../make-test-python.nix ( }; testScript = '' machine.wait_for_unit("sockets.target") machine.wait_for_unit("incus.service") machine.wait_for_file("/var/lib/incus/unix.socket") # Configure incus listen address machine.succeed("incus config set core.https_address :8443") machine.succeed("systemctl restart incus") # Check that the INCUS_UI environment variable is populated in the systemd unit machine.succeed("cat /etc/systemd/system/incus.service | grep 'INCUS_UI'") machine.succeed("systemctl cat incus.service | grep 'INCUS_UI'") # Ensure the endpoint returns an HTML page with 'Incus UI' in the title machine.succeed("curl -kLs https://localhost:8443/ui | grep '<title>Incus UI</title>'") Loading
pkgs/by-name/in/incus-ui-canonical/package.nix +13 −13 Original line number Diff line number Diff line { lib, stdenv, fetchurl, fetchFromGitHub, fetchYarnDeps, nodejs, Loading @@ -9,32 +10,31 @@ nixosTests, git, }: let # this rarely changes https://github.com/zabbly/incus/blob/daily/patches/ui-canonical-renames.sed renamesSed = fetchurl { url = "https://raw.githubusercontent.com/zabbly/incus/0fa53811ff1043fd9f28c8b78851b60ca58e1b10/patches/ui-canonical-renames.sed"; hash = "sha256-f0vd/Xp/kBbZkg6CBM4cZPlwg5WUL/zv3mCAEmugzCE="; }; in stdenv.mkDerivation rec { pname = "incus-ui-canonical"; version = "0.14.6"; version = "0.15"; src = fetchFromGitHub { owner = "zabbly"; repo = "incus-ui-canonical"; tag = "incus-${version}"; hash = "sha256-An2mhIj3D2EdB1Bgnry1l2m6r/GIKTee4anSYNTq8B8="; tag = version; hash = "sha256-HqdaG51W7eUCGUhA+9pYrAWaA6qyK7Fc95CKJvk9GaA="; }; offlineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; hash = "sha256-dkATFNjAPhrPbXhcJ/R4eIpcagKEwBSnRfLwqTPIe6c="; }; zabbly = fetchFromGitHub { owner = "zabbly"; repo = "incus"; rev = "36714d7c38eb3cc3e4e821c7aed44e066e1e84ca"; hash = "sha256-H6gjXmwCv3oGXrzn1NENfgO3CWXMnmp94GdJv2Q8n0w="; hash = "sha256-O7oEAjmCEmPpsO/rdkZVhUkxhFzhHpPRbmci3yRBA7g="; }; patchPhase = '' sed -i -f "$zabbly/patches/ui-canonical-renames.sed" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts* find -type f -name "*.ts" -o -name "*.tsx" -o -name "*.scss" -o -name "*.html" | xargs sed -i -f ${renamesSed} ''; nativeBuildInputs = [ Loading