nixpkgs/nixos/modules/system/boot
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
..
loader treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
systemd treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
binfmt.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
clevis.md treewide: run treefmt with mdcr/nixfmt 2025-07-24 14:58:15 +02:00
clevis.nix nixos/clevis: fix clevis in scripted initrd 2025-06-03 16:00:46 +00:00
emergency-mode.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
grow-partition.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
initrd-network.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
initrd-openvpn.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
initrd-ssh.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
kernel.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
kernel_config.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
kexec.nix treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
luksroot.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
modprobe.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
networkd.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
pbkdf2-sha512.c
plymouth.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
resolved.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
shutdown.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
stage-1-init.sh
stage-1.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
stage-2-init.sh stage-2-init: fix false positives for RO Nix store mounts 2025-01-20 00:27:18 -08:00
stage-2.nix various: replace substituteAll with replaceVarsWith 2024-12-15 13:35:30 +01:00
stratisroot.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
systemd.nix nixos/systemd: fix run0 failing to run commands 2025-07-28 21:59:21 +00:00
timesyncd.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
tmp.nix nixos/boot/tmp: introduce adaptive huge memory pages 2025-05-05 22:52:02 +00:00
uki.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
unl0kr.nix nixos/unl0kr: fix touchpads 2025-05-09 00:29:43 +02:00
uvesafb.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00