diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 9ffeba27a7f..02ac737dbe1 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -340,6 +340,7 @@ in systemd-binfmt = handleTestOn ["x86_64-linux"] ./systemd-binfmt.nix {}; systemd-boot = handleTest ./systemd-boot.nix {}; systemd-confinement = handleTest ./systemd-confinement.nix {}; + systemd-journal = handleTest ./systemd-journal.nix {}; systemd-timesyncd = handleTest ./systemd-timesyncd.nix {}; systemd-networkd-vrf = handleTest ./systemd-networkd-vrf.nix {}; systemd-networkd = handleTest ./systemd-networkd.nix {}; diff --git a/nixos/tests/systemd-journal.nix b/nixos/tests/systemd-journal.nix new file mode 100644 index 00000000000..c50c151ae10 --- /dev/null +++ b/nixos/tests/systemd-journal.nix @@ -0,0 +1,20 @@ +import ./make-test-python.nix ({ pkgs, ... }: + +{ + name = "systemd-journal"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ lewo ]; + }; + + machine = { pkgs, lib, ... }: { + services.journald.enableHttpGateway = true; + }; + + testScript = '' + machine.wait_for_unit("multi-user.target") + + machine.succeed( + "${pkgs.curl}/bin/curl -s localhost:19531/machine | ${pkgs.jq}/bin/jq -e '.hostname == \"machine\"'" + ) + ''; +}) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 8aaeddd1e81..0a89fe3720a 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -53,6 +53,7 @@ , withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms , kexectools , bashInteractive +, libmicrohttpd , withAnalyze ? true , withApparmor ? true @@ -71,7 +72,7 @@ , withNss ? true , withPCRE2 ? true , withPolkit ? true -, withRemote ? false # has always been disabled on NixOS, upstream version appears broken anyway +, withRemote ? true , withResolved ? true , withShellCompletions ? true , withTimedated ? true @@ -201,6 +202,7 @@ stdenv.mkDerivation { ++ lib.optional withPCRE2 pcre2 ++ lib.optional withResolved libgpgerror ++ lib.optional withSelinux libselinux + ++ lib.optional withRemote libmicrohttpd ; #dontAddPrefix = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 36c9cba9088..74b8e7ddce1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18812,6 +18812,7 @@ in withNss = false; withPCRE2 = false; withPolkit = false; + withRemote = false; withResolved = false; withShellCompletions = false; withTimedated = false;