From dbf29d874a44495ce03e7f4ce03b38863d0df12e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 12 Aug 2025 23:48:39 +0200 Subject: [PATCH] nixos/systemd-machinectl: fix eval with allowAliases=false; unified hierachy is enabled already --- nixos/tests/systemd-machinectl.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nixos/tests/systemd-machinectl.nix b/nixos/tests/systemd-machinectl.nix index 784d2f4d09ba..cc6975588ff6 100644 --- a/nixos/tests/systemd-machinectl.nix +++ b/nixos/tests/systemd-machinectl.nix @@ -98,11 +98,6 @@ in serviceConfig.Environment = [ # Disable tmpfs for /tmp "SYSTEMD_NSPAWN_TMPFS_TMP=0" - - # force unified cgroup delegation, which would be the default - # if systemd could check the capabilities of the installed systemd. - # see also: https://github.com/NixOS/nixpkgs/pull/198526 - "SYSTEMD_NSPAWN_UNIFIED_HIERARCHY=1" ]; overrideStrategy = "asDropin"; }; @@ -152,7 +147,7 @@ in # Test if systemd-nspawn provides a working environment for nix to build derivations # https://nixos.org/guides/nix-pills/07-working-derivation - machine.succeed('systemd-run --pty --wait -M ${containerName} /run/current-system/sw/bin/nix-instantiate --expr \'derivation { name = "myname"; builder = "/bin/sh"; args = [ "-c" "echo foo > $out" ]; system = "${pkgs.system}"; }\' --add-root /tmp/drv') + machine.succeed('systemd-run --pty --wait -M ${containerName} /run/current-system/sw/bin/nix-instantiate --expr \'derivation { name = "myname"; builder = "/bin/sh"; args = [ "-c" "echo foo > $out" ]; system = "${pkgs.stdenv.hostPlatform.system}"; }\' --add-root /tmp/drv') machine.succeed('systemd-run --pty --wait -M ${containerName} /run/current-system/sw/bin/nix-store --option substitute false --realize /tmp/drv') # Test nss_mymachines without nscd