1
0
Fork 0
dotfiles/system/shared/show-update-changelog.nix
Daniel Kempkens 650be0e27e
All checks were successful
Update Flake / update-flake (push) Successful in 3m20s
Build / build-arm64-linux (push) Successful in 12m23s
Build / build-amd64-linux (push) Successful in 28s
chore: use lib.getExe in more places
2023-12-14 00:29:09 +01:00

26 lines
750 B
Nix

{ pkgs, config, lib, ... }:
let
inherit (lib) mkIf;
inherit (pkgs.stdenv) isDarwin;
inherit (pkgs.stdenv) isLinux;
in
{
system.activationScripts = {
show-update-changelog = mkIf isLinux ''
if [[ -e /run/current-system ]]; then
echo "[show-update-changelog] System Changelog"
${lib.getExe pkgs.nvd} --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig"
fi
'';
postActivation = mkIf isDarwin {
text = ''
if [[ -e /run/current-system ]]; then
echo "[show-update-changelog] System Changelog"
sudo -H ${lib.getExe pkgs.nvd} --nix-bin-dir='${config.nix.package}/bin' diff /run/current-system "$systemConfig"
fi
'';
};
};
}