Skip to content

Commit

Permalink
refactor: change to use lib.getExe
Browse files Browse the repository at this point in the history
  • Loading branch information
s3igo committed Sep 28, 2024
1 parent c134a89 commit 9195aae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions home/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pkgs,
config,
# osConfig,
# lib,
lib,
...
}:

Expand Down Expand Up @@ -145,7 +145,7 @@ in
set fish_greeting
# LS_COLORS
set --export LS_COLORS "$(${pkgs.vivid}/bin/vivid generate snazzy)"
set --export LS_COLORS "$(${lib.getExe pkgs.vivid} generate snazzy)"
# # restricting abbrs
# ## git
Expand Down Expand Up @@ -196,6 +196,6 @@ in
};

# home.activation.updateFishCompletions = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
# ${pkgs.fish}/bin/fish -c 'fish_update_completions'
# ${lib.getExe pkgs.fish} -c 'fish_update_completions'
# '';
}
4 changes: 2 additions & 2 deletions home/git.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:

{
programs.git = {
Expand All @@ -8,7 +8,7 @@
sync = "pull --rebase --autostash";
init-empty = "!git init && git commit --allow-empty -m 'initial commit'";
init-exist = "!git init && git add . && git commit -m 'first commit'";
create = ''!f() { ${pkgs.gh}/bin/gh repo create "$1" --private && ${pkgs.ghq}/bin/ghq get -p "$1"; }; f'';
create = ''!f() { ${lib.getExe pkgs.gh} repo create "$1" --private && ${lib.getExe pkgs.ghq} get -p "$1"; }; f'';
pr = ''!f() { git fetch origin "pull/$1/head:PR-$1"; }; f'';
};
delta = {
Expand Down
4 changes: 2 additions & 2 deletions home/joshuto.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:

let
package = pkgs.joshuto.overrideAttrs (oldAttrs: rec {
Expand Down Expand Up @@ -70,7 +70,7 @@ in
fish.functions.jo = ''
mkdir -p /tmp/$USER
set -l output_file "/tmp/$USER/joshuto-cwd-$fish_pid"
${package}/bin/joshuto --output-file "$output_file" $argv
${lib.getExe package} --output-file "$output_file" $argv
# Whether the output contains the current directory
if test $status -eq 101
Expand Down
2 changes: 1 addition & 1 deletion home/wezterm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in
---@type { default: table, scheme: table }
local colors = require('colors')
require('events')(colors.default, '${chissoku}/bin/chissoku')
require('events')(colors.default, '${lib.getExe chissoku}')
return require('config')(
colors.scheme,
require('wezterm').font('UDEV Gothic NFLG'),
Expand Down

0 comments on commit 9195aae

Please sign in to comment.