From c5e15987ed24329c08927eee789539100890d93b Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 7 Jan 2024 18:17:14 +0100 Subject: [PATCH] feat(modules/dgn-console): Add an activation script showing system diffs --- modules/dgn-console.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/dgn-console.nix b/modules/dgn-console.nix index a8a3408..28347b7 100644 --- a/modules/dgn-console.nix +++ b/modules/dgn-console.nix @@ -42,6 +42,14 @@ in { }; }) ]; + + system.activationScripts.diff = { + supportsDryActivation = true; + text = '' + ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig" + ''; + }; + programs.bash.promptInit = '' FQDN="$(hostname).$(domainname)" # Provide a nice prompt if the terminal supports it. @@ -85,6 +93,5 @@ in { --old-bindir $OLDBIN --new-bindir $NEWBIN \ "$@" ''); - }; }