Skip to content

Commit

Permalink
{environment,nix-tools}: correct default $PATH ordering to match macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
emilazy committed Jan 15, 2025
1 parent bd92122 commit ff1d638
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/environment/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/nix-tools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/environment-path.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ with lib;
"afterProfile/bin"
"/usr/local/bin"
"/usr/bin"
"/usr/sbin"
"/bin"
"/usr/sbin"
"/sbin"
"afterPath"
]}"
Expand Down

0 comments on commit ff1d638

Please sign in to comment.