Skip to content

Commit

Permalink
use lib.getExe instead of manual /bin hardcoding
Browse files Browse the repository at this point in the history
This makes swapping out otherwise-equivalent packages easier, and it's
just more pleasing to the eye :)
  • Loading branch information
tomodachi94 committed Mar 28, 2024
1 parent 7a1a7de commit d81af3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions home/common/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
defaultBranch = "main";
};
core = {
editor = "${pkgs.neovim}/bin/nvim";
editor = "${pkgs.lib.getExe pkgs.neovim}";
};
color = {
ui = "auto";
};
diff = {
algorithm = "histogram";
tool = "${pkgs.neovim}/bin/nvim -d";
tool = "${pkgs.lib.getExe pkgs.neovim} -d";
};
help = {
autocorrect = 20;
Expand Down
4 changes: 2 additions & 2 deletions home/common/nvim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ in
{
imports = [ ./nix ];
home.sessionVariables = {
EDITOR = "${pkgs.neovim}/bin/nvim";
VISUAL = "${pkgs.neovim}/bin/nvim";
EDITOR = "${pkgs.lib.getExe pkgs.neovim}";
VISUAL = "${pkgs.lib.getExe pkgs.neovim}";
};
xdg.configFile."nvim/lua".source = ./lua;
xdg.configFile."nvim/snips".source = ./snips;
Expand Down
2 changes: 1 addition & 1 deletion home/linux/i3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## end manual config ##
'';
onChange = ''
if [ ${pkgs.xorg.xprop}/bin/xprop -root | ${pkgs.gnugrep} i3 ]; then
if [ ${pkgs.lib.getExe pkgs.xorg.xprop} -root | ${pkgs.lib.getExe pkgs.gnugrep} i3 ]; then
noteEcho "Reloading i3 to apply changes"
${pkgs.i3}/bin/i3-msg reload
else
Expand Down

0 comments on commit d81af3d

Please sign in to comment.