nixpkgs/nixos/modules/system
Jason Yundt d5378cec85 nixos/systemd: fix run0 failing to run commands
Fixes #361592.

I was able to test this change by doing the following:

1. Create a file named “test-systemd-run0.nix” that contains this Nix
expression:

    let
      nixpkgs = /path/to/nixpkgs;
      pkgs = import nixpkgs { };
    in
    pkgs.testers.runNixOSTest {
      name = "test-systemd-run0";
      nodes.machine = {
        security.polkit.enable = true;
      };
      testScript = ''
        start_all()
        machine.succeed("run0 env")
      '';
    }

2. Replace “/path/to/nixpkgs” with the actual path to an actual copy of
Nixpkgs.

3. Run the integration test by running this command:

    nix-build <path to test-systemd-run0.nix>

(cherry picked from commit d54262911c)
2025-07-28 21:59:21 +00:00
..
activation treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
boot nixos/systemd: fix run0 failing to run commands 2025-07-28 21:59:21 +00:00
etc treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
build.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00