diff --git a/system/hosts/adsb-antenna.nix b/system/hosts/adsb-antenna.nix index 6219691..cc47acb 100644 --- a/system/hosts/adsb-antenna.nix +++ b/system/hosts/adsb-antenna.nix @@ -7,6 +7,7 @@ in { imports = [ ../../hardware/hosts/adsb-antenna.nix + ../shared/show-update-changelog.nix ../nixos/raspberry.nix ../nixos/ssh.nix diff --git a/system/hosts/attic.nix b/system/hosts/attic.nix index 95ba3e0..f326058 100644 --- a/system/hosts/attic.nix +++ b/system/hosts/attic.nix @@ -8,6 +8,7 @@ in imports = [ ../../hardware/hosts/attic.nix ../../agenix/hosts/attic/config.nix + ../shared/show-update-changelog.nix ../nixos/ssh.nix ../nixos/git.nix diff --git a/system/hosts/mediaserver.nix b/system/hosts/mediaserver.nix index c28475a..b641f98 100644 --- a/system/hosts/mediaserver.nix +++ b/system/hosts/mediaserver.nix @@ -8,6 +8,7 @@ in imports = [ ../../hardware/hosts/mediaserver.nix ../../agenix/hosts/mediaserver/config.nix + ../shared/show-update-changelog.nix ../nixos/ssh.nix ../nixos/git.nix diff --git a/system/hosts/sail.nix b/system/hosts/sail.nix index 0e7853a..edd8bc0 100644 --- a/system/hosts/sail.nix +++ b/system/hosts/sail.nix @@ -1,8 +1,6 @@ -args@{ pkgs, lib, ... }: +args@{ pkgs, ... }: let - inherit (lib) optionals; - secret = import ../../secret/hosts/sail.nix; ssh-keys = import ../shared/ssh-keys.nix; in @@ -10,6 +8,7 @@ in imports = [ ../../hardware/hosts/sail.nix ../../agenix/hosts/sail/config.nix + ../shared/show-update-changelog.nix ../nixos/ssh.nix ../nixos/git.nix diff --git a/system/shared/show-update-changelog.nix b/system/shared/show-update-changelog.nix index b881406..c85b5e5 100644 --- a/system/shared/show-update-changelog.nix +++ b/system/shared/show-update-changelog.nix @@ -1,7 +1,10 @@ -{ pkgs, config, ... }: +{ config, ... }: { system.activationScripts.show-update-changelog = '' - ${pkgs.nvd}/bin/nvd --nix-bin-dir='${config.nix.package}/bin' diff $(ls -d /nix/var/nix/profiles/system-*-link | tail -n2) + if [[ -e /run/current-system ]]; then + echo "[show-update-changelog] Changelog" + ${config.nix.package}/bin/nix store diff-closures /run/current-system "$systemConfig" || true + fi ''; }