From 7b47838e5221494cf7186de37292eb7dcfdecbeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Wed, 5 Jul 2023 16:07:48 +0100 Subject: [PATCH] print diff on activation --- nixos/common.nix | 3 +++ nixos/server-common.nix | 3 +++ 2 files changed, 6 insertions(+) diff --git a/nixos/common.nix b/nixos/common.nix index 7ecd3f06..48f32ed8 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -107,4 +107,7 @@ in { }; system = { inherit stateVersion; }; + system.activationScripts.diff = '' + ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig" + ''; } diff --git a/nixos/server-common.nix b/nixos/server-common.nix index a5f4dca6..6a8149f2 100644 --- a/nixos/server-common.nix +++ b/nixos/server-common.nix @@ -12,4 +12,7 @@ enableNsncd = true; }; system.stateVersion = "22.11"; + system.activationScripts.diff = '' + ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig" + ''; }