treewide: use 'lib.getExe' when possible

This commit is contained in:
Bruno BELANYI 2023-07-23 18:58:40 +01:00
parent 92b26e9d54
commit b8b3e51dc6
13 changed files with 24 additions and 28 deletions

View file

@ -8,7 +8,7 @@ let
realName = lib.mkDefault "Bruno BELANYI";
userName = lib.mkDefault (mkMailAddress address domain);
passwordCommand =
lib.mkDefault [ "${pkgs.ambroisie.bw-pass}/bin/bw-pass" "Mail" passName ];
lib.mkDefault [ (lib.getExe pkgs.ambroisie.bw-pass) "Mail" passName ];
address = mkMailAddress address domain;
aliases = builtins.map (lib.flip mkMailAddress domain) aliases;

View file

@ -9,7 +9,7 @@ in
settings = {
notify-cmd =
let
notify-send = "${pkgs.libnotify}/bin/notify-send";
notify-send = lib.getExe pkgs.libnotify;
in
pkgs.writeScript "mail-notifier" ''
SENDER="$1"

View file

@ -47,8 +47,8 @@ in
command = mkOption {
type = types.str;
default = "${pkgs.i3lock}/bin/i3lock -n -c 000000";
example = "\${pkgs.i3lock}/bin/i3lock -n -i lock.png";
default = "${lib.getExe pkgs.i3lock} -n -c 000000";
example = "\${lib.getExe pkgs.i3lock} -n -i lock.png";
description = "Locker command to run";
};

View file

@ -27,13 +27,13 @@ let
genMovementBindings = f: addVimKeyBindings (lib.my.genAttrs' movementKeys f);
# Used in multiple scripts to show messages through keybindings
notify-send = "${pkgs.libnotify}/bin/notify-send";
notify-send = lib.getExe pkgs.libnotify;
# Screen backlight management
changeBacklight = "${pkgs.ambroisie.change-backlight}/bin/change-backlight";
changeBacklight = lib.getExe pkgs.ambroisie.change-backlight;
# Audio and volume management
changeAudio = "${pkgs.ambroisie.change-audio}/bin/change-audio";
changeAudio = lib.getExe pkgs.ambroisie.change-audio;
# Lock management
toggleXautolock =

View file

@ -5,7 +5,7 @@ let
notficationCmd =
let
duration = toString (cfg.notify.delay * 1000);
notifyCmd = "${pkgs.libnotify}/bin/notify-send -u critical -t ${duration}";
notifyCmd = "${lib.getExe pkgs.libnotify} -u critical -t ${duration}";
in
# Needs to be surrounded by quotes for systemd to launch it correctly
''"${notifyCmd} -- 'Locking in ${toString cfg.notify.delay} seconds'"'';