From b047f2e66641a91c63884ada54d52b7add6dc8d5 Mon Sep 17 00:00:00 2001 From: Parthiv Krishna Date: Tue, 16 Sep 2025 06:31:17 +0000 Subject: [PATCH 1/4] maintainers: add parthiv-krishna --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 347b35e84e6d..16cbc60b2dcf 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19674,6 +19674,12 @@ githubId = 821972; name = "Parth Mehrotra"; }; + parthiv-krishna = { + email = "nixpkgs@parthiv.cc"; + github = "parthiv-krishna"; + githubId = 20658472; + name = "Parthiv Krishna"; + }; pascalj = { email = "nix@pascalj.de"; github = "pascalj"; From 3df6d80063e7898b15b43e8563d92cb8ab887915 Mon Sep 17 00:00:00 2001 From: Parthiv Krishna Date: Tue, 16 Sep 2025 06:32:48 +0000 Subject: [PATCH 2/4] homepage-dashboard: add `parthiv-krishna` to maintainers --- nixos/tests/homepage-dashboard.nix | 2 +- pkgs/by-name/ho/homepage-dashboard/package.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/homepage-dashboard.nix b/nixos/tests/homepage-dashboard.nix index 35165f650e9d..53e5b113cd02 100644 --- a/nixos/tests/homepage-dashboard.nix +++ b/nixos/tests/homepage-dashboard.nix @@ -1,7 +1,7 @@ { lib, ... }: { name = "homepage-dashboard"; - meta.maintainers = with lib.maintainers; [ ]; + meta.maintainers = with lib.maintainers; [ parthiv-krishna ]; nodes.machine = _: { services.homepage-dashboard = { diff --git a/pkgs/by-name/ho/homepage-dashboard/package.nix b/pkgs/by-name/ho/homepage-dashboard/package.nix index 6428c52261d6..1ae2d7dfe1cd 100644 --- a/pkgs/by-name/ho/homepage-dashboard/package.nix +++ b/pkgs/by-name/ho/homepage-dashboard/package.nix @@ -111,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "homepage"; homepage = "https://gethomepage.dev"; license = lib.licenses.gpl3; - maintainers = with lib.maintainers; [ ]; + maintainers = with lib.maintainers; [ parthiv-krishna ]; platforms = lib.platforms.all; }; }) From 4058df754ee65c3b5105245be75ef31437082288 Mon Sep 17 00:00:00 2001 From: Parthiv Krishna Date: Tue, 16 Sep 2025 06:33:37 +0000 Subject: [PATCH 3/4] homepage-dashboard: add unixtools.ping to wrapper PATH This gives homepage access to `ping` so it can be used when the ping property on a service is configured --- pkgs/by-name/ho/homepage-dashboard/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ho/homepage-dashboard/package.nix b/pkgs/by-name/ho/homepage-dashboard/package.nix index 1ae2d7dfe1cd..b5f753af768d 100644 --- a/pkgs/by-name/ho/homepage-dashboard/package.nix +++ b/pkgs/by-name/ho/homepage-dashboard/package.nix @@ -6,6 +6,7 @@ pnpm_10, python3, stdenv, + unixtools, cctools, lib, nixosTests, @@ -89,7 +90,8 @@ stdenv.mkDerivation (finalAttrs: { --set-default PORT 3000 \ --set-default HOMEPAGE_CONFIG_DIR /var/lib/homepage-dashboard \ --set-default NIXPKGS_HOMEPAGE_CACHE_DIR /var/cache/homepage-dashboard \ - --add-flags "$out/share/homepage/server.js" + --add-flags "$out/share/homepage/server.js" \ + --set PATH "${lib.makeBinPath [ unixtools.ping ]}" ${if enableLocalIcons then installLocalIcons else ""} From 74411c6c0d5ef37c3c93dea06e24d92c0f204415 Mon Sep 17 00:00:00 2001 From: Parthiv Krishna Date: Wed, 17 Sep 2025 08:20:45 +0000 Subject: [PATCH 4/4] nixosTests.homepage-dashboard: add test for ping property on service Use homepage's API to ensure that ping works --- nixos/tests/homepage-dashboard.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nixos/tests/homepage-dashboard.nix b/nixos/tests/homepage-dashboard.nix index 53e5b113cd02..d72ebc215295 100644 --- a/nixos/tests/homepage-dashboard.nix +++ b/nixos/tests/homepage-dashboard.nix @@ -21,10 +21,23 @@ ]; } ]; + services = [ + { + Machines = [ + { + Localhost = { + ping = "127.0.0.1"; + }; + } + ]; + } + ]; }; }; testScript = '' + import json + # Ensure the services are started on managed machine machine.wait_for_unit("homepage-dashboard.service") machine.wait_for_open_port(8082) @@ -40,5 +53,9 @@ # Ensure that we see the custom bookmarks on the page page = machine.succeed("curl --fail http://127.0.0.1:8082/api/bookmarks") assert "nixpkgs" in page, "Custom bookmarks not found" + + # Ensure that the ping command works + response = machine.succeed("curl --fail \"http://localhost:8082/api/ping?groupName=Machines&serviceName=Localhost\"") + assert json.loads(response)["alive"] is True, "Ping to localhost failed" ''; }