From ff1d6384dfa276ff4ab092fd9f37a66b5234466c Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 13 Jan 2025 23:21:04 +0000 Subject: [PATCH] {environment,nix-tools}: correct default `$PATH` ordering to match macOS --- modules/environment/default.nix | 2 +- pkgs/nix-tools/default.nix | 2 +- tests/environment-path.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/environment/default.nix b/modules/environment/default.nix index fc4db2aba..79f760e9e 100644 --- a/modules/environment/default.nix +++ b/modules/environment/default.nix @@ -161,7 +161,7 @@ in environment.systemPath = mkMerge [ [ (makeBinPath cfg.profiles) ] - (mkOrder 1200 [ "/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" ]) + (mkOrder 1200 [ "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" ]) ]; # Use user, default and system profiles. diff --git a/pkgs/nix-tools/default.nix b/pkgs/nix-tools/default.nix index 5fdc3821a..4a496bb15 100644 --- a/pkgs/nix-tools/default.nix +++ b/pkgs/nix-tools/default.nix @@ -6,7 +6,7 @@ , stdenv , profile ? "/nix/var/nix/profiles/system" , nixPackage ? "/nix/var/nix/profiles/default" -, systemPath ? "$HOME/.nix-profile/bin:/etc/profiles/per-user/$USER/bin:/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" +, systemPath ? "$HOME/.nix-profile/bin:/etc/profiles/per-user/$USER/bin:/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" }: let diff --git a/tests/environment-path.nix b/tests/environment-path.nix index 0bb9a0558..b5e4754d6 100644 --- a/tests/environment-path.nix +++ b/tests/environment-path.nix @@ -30,8 +30,8 @@ with lib; "afterProfile/bin" "/usr/local/bin" "/usr/bin" - "/usr/sbin" "/bin" + "/usr/sbin" "/sbin" "afterPath" ]}"