mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
purge: update
This commit is contained in:
parent
dcb384b1cd
commit
4fcf655dc4
5 changed files with 16 additions and 11 deletions
|
@ -1,9 +1,16 @@
|
|||
{ config, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
system.activationScripts.report-nixos-changes = ''
|
||||
if [ -e /run/current-system ] && [ -e $systemConfig ]; then
|
||||
echo System package diff:
|
||||
${config.nix.package}/bin/nix store diff-closures /run/current-system $systemConfig || true
|
||||
fi
|
||||
NO_FORMAT="\033[0m"
|
||||
F_BOLD="\033[1m"
|
||||
C_RED="\033[38;5;9m"
|
||||
${pkgs.diffutils}/bin/cmp --silent \
|
||||
<(readlink /run/current-system/{initrd,kernel,kernel-modules}) \
|
||||
<(readlink $systemConfig/{initrd,kernel,kernel-modules}) \
|
||||
|| echo -e "''${F_BOLD}''${C_RED}Kernel version changed, reboot is advised.''${NO_FORMAT}"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue