nixos: show diff to current system at activation time
This commit is contained in:
parent
8bb9b734f1
commit
a7be658b1b
2 changed files with 10 additions and 0 deletions
|
@ -14,6 +14,7 @@ in
|
|||
./packages.nix
|
||||
./nitrokey.nix
|
||||
./nix-settings.nix
|
||||
./upgrade-diff.nix
|
||||
];
|
||||
|
||||
services.davfs2.enable = true;
|
||||
|
|
9
common/upgrade-diff.nix
Normal file
9
common/upgrade-diff.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
# MIT Jörg Thalheim - https://github.com/Mic92/dotfiles/blob/c6cad4e57016945c4816c8ec6f0a94daaa0c3203/nixos/modules/upgrade-diff.nix
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
system.activationScripts.diff = ''
|
||||
if [[ -e /run/current-system ]]; then
|
||||
${pkgs.nix}/bin/nix store diff-closures /run/current-system "$systemConfig"
|
||||
fi
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue