Use lib function to get exe path instead of manually assigning /bin
This commit is contained in:
parent
e4ea8e8a4f
commit
b79ffba8e8
2 changed files with 8 additions and 8 deletions
|
@ -6,15 +6,12 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
|
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
|
||||||
hasRipgrep = hasPackage "ripgrep";
|
|
||||||
hasLftp = hasPackage "lftp";
|
hasLftp = hasPackage "lftp";
|
||||||
hasExa = hasPackage "eza";
|
hasExa = hasPackage "eza";
|
||||||
hasLazygit = config.programs.lazygit.enable;
|
hasLazygit = config.programs.lazygit.enable;
|
||||||
hasLazydocker = hasPackage "lazydocker";
|
hasLazydocker = hasPackage "lazydocker";
|
||||||
hasNixYourShell = hasPackage "nix-your-shell";
|
hasNixYourShell = hasPackage "nix-your-shell";
|
||||||
hasShellColor = config.programs.shellcolor.enable;
|
|
||||||
hasWezterm = config.programs.wezterm.enable;
|
hasWezterm = config.programs.wezterm.enable;
|
||||||
shellcolor = "${pkgs.shellcolord}/bin/shellcolor";
|
|
||||||
in {
|
in {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -104,6 +101,6 @@ in {
|
||||||
|
|
||||||
# Applies tide configure on rebuild
|
# Applies tide configure on rebuild
|
||||||
home.activation.configureTide = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
home.activation.configureTide = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
${pkgs.fish}/bin/fish -c "fish_init_custom"
|
${lib.getExe pkgs.fish} -c "fish_init_custom"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{ pkgs, ... }: {
|
{ lib
|
||||||
|
, pkgs
|
||||||
|
, ...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./global
|
./global
|
||||||
./features/desktop/awesome
|
./features/desktop/awesome
|
||||||
|
@ -22,14 +25,14 @@
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
settings = {
|
settings = {
|
||||||
exec-once = [
|
exec-once = [
|
||||||
"${pkgs.batsignal}/bin/batsignal -c 20 -w 30 -f 80 -n BAT0 -a Battery"
|
"${lib.getExe pkgs.batsignal} -c 20 -w 30 -f 80 -n BAT0 -a Battery"
|
||||||
];
|
];
|
||||||
bind = [
|
bind = [
|
||||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
|
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +10%"
|
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set +10%"
|
||||||
", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 10%-"
|
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 10%-"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue