configured backups

This commit is contained in:
Rouven Seifert 2023-07-30 19:41:51 +02:00
parent 60e1f3c3d0
commit b48fa4e383
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
25 changed files with 217 additions and 92 deletions

View file

@ -1,7 +1,9 @@
{ lib, pkgs, ... }:
{ config, ... }:
{
system.activationScripts.report-nixos-changes = ''
PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]}
nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2) || true
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
'';
}