diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index 8dfe7f7..00414dc 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -433,7 +433,7 @@ in activation.neovimCache = lib.hm.dag.entryAfter [ "linkGeneration" ] /* bash */ '' $VERBOSE_ECHO "Resetting loader" - $DRY_RUN_CMD ${config.programs.neovim.finalPackage}/bin/nvim -l <(echo "vim.loader.reset()") + $DRY_RUN_CMD ${lib.getExe config.programs.neovim.finalPackage} -l <(echo "vim.loader.reset()") ''; }; } diff --git a/home/programs/yt-dlp.nix b/home/programs/yt-dlp.nix index abb2616..9f660c4 100644 --- a/home/programs/yt-dlp.nix +++ b/home/programs/yt-dlp.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: { programs.yt-dlp = { @@ -35,7 +35,7 @@ }; functions.ytdl_with_options = '' - ${config.programs.yt-dlp.package}/bin/yt-dlp --config-location "$HOME/.config/yt-dlp/config" --download-archive "$HOME/.config/yt-dlp/archive" $argv + ${lib.getExe config.programs.yt-dlp.package} --config-location "$HOME/.config/yt-dlp/config" --download-archive "$HOME/.config/yt-dlp/archive" $argv ''; }; } diff --git a/system/nixos/container.nix b/system/nixos/container.nix index b23c205..6868829 100644 --- a/system/nixos/container.nix +++ b/system/nixos/container.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: { virtualisation = { @@ -37,7 +37,7 @@ serviceConfig = { Type = "oneshot"; - ExecStart = "${pkgs.bash}/bin/bash -c 'until ${pkgs.iproute2}/bin/ip address show podman0; do sleep 1; done'"; + ExecStart = "${lib.getExe pkgs.bash} -c 'until ${pkgs.iproute2}/bin/ip address show podman0; do sleep 1; done'"; }; }; diff --git a/system/nixos/fedifetcher.nix b/system/nixos/fedifetcher.nix index fa0f03e..5419926 100644 --- a/system/nixos/fedifetcher.nix +++ b/system/nixos/fedifetcher.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: { systemd.services.fedifetcher = { @@ -13,7 +13,7 @@ DynamicUser = true; StateDirectory = "fedifetcher"; LoadCredential = "config.json:${config.age.secrets.fedifetcher-config.path}"; - ExecStart = "${pkgs.fedifetcher}/bin/fedifetcher --config=%d/config.json"; + ExecStart = "${lib.getExe pkgs.fedifetcher} --config=%d/config.json"; }; }; } diff --git a/system/nixos/mastodon.nix b/system/nixos/mastodon.nix index 257e670..754b2f3 100644 --- a/system/nixos/mastodon.nix +++ b/system/nixos/mastodon.nix @@ -134,7 +134,7 @@ in serviceConfig = { Type = "oneshot"; - ExecStart = "${pkgs.bash}/bin/bash -c 'until ${pkgs.curl}/bin/curl --fail --silent https://${web-domain} > /dev/null; do sleep 1; done'"; + ExecStart = "${lib.getExe pkgs.bash} -c 'until ${lib.getExe pkgs.curl} --fail --silent https://${web-domain} > /dev/null; do sleep 1; done'"; }; }; diff --git a/system/nixos/matrix/mautrix-signal.nix b/system/nixos/matrix/mautrix-signal.nix index 7a2a9e3..e36b444 100644 --- a/system/nixos/matrix/mautrix-signal.nix +++ b/system/nixos/matrix/mautrix-signal.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: { services.signald.enable = true; @@ -16,7 +16,7 @@ User = config.services.signald.user; Group = config.services.signald.group; LoadCredential = [ "config:${config.age.secrets.mautrix-signal-config.path}" ]; - ExecStart = "${pkgs.mautrix-signal}/bin/mautrix-signal --config=%d/config --no-update"; + ExecStart = "${lib.getExe pkgs.mautrix-signal} --config=%d/config --no-update"; Restart = "on-failure"; RestartSec = "5s"; diff --git a/system/nixos/matrix/mautrix-whatsapp.nix b/system/nixos/matrix/mautrix-whatsapp.nix index 7471e9a..af3d9f7 100644 --- a/system/nixos/matrix/mautrix-whatsapp.nix +++ b/system/nixos/matrix/mautrix-whatsapp.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: { systemd.services.mautrix-whatsapp = { @@ -11,7 +11,7 @@ DynamicUser = true; StateDirectory = "mautrix-whatsapp"; LoadCredential = [ "config:${config.age.secrets.mautrix-whatsapp-config.path}" ]; - ExecStart = "${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp --config=%d/config --no-update"; + ExecStart = "${lib.getExe pkgs.mautrix-whatsapp} --config=%d/config --no-update"; Restart = "on-failure"; RestartSec = "5s"; diff --git a/system/shared/show-update-changelog.nix b/system/shared/show-update-changelog.nix index d094b69..d550ce9 100644 --- a/system/shared/show-update-changelog.nix +++ b/system/shared/show-update-changelog.nix @@ -10,7 +10,7 @@ in show-update-changelog = mkIf isLinux '' if [[ -e /run/current-system ]]; then echo "[show-update-changelog] System Changelog" - ${pkgs.nvd}/bin/nvd --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig" + ${lib.getExe pkgs.nvd} --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig" fi ''; @@ -18,7 +18,7 @@ in text = '' if [[ -e /run/current-system ]]; then echo "[show-update-changelog] System Changelog" - sudo -H ${pkgs.nvd}/bin/nvd --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig" + sudo -H ${lib.getExe pkgs.nvd} --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig" fi ''; };