diff --git a/flake.lock b/flake.lock index bcfca0e..37615ea 100644 --- a/flake.lock +++ b/flake.lock @@ -196,11 +196,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1684049129, - "narHash": "sha256-7WB9LpnPNAS8oI7hMoHeKLNhRX7k3CI9uWBRSfmOCCE=", + "lastModified": 1684139381, + "narHash": "sha256-YPLMeYE+UzxxP0qbkBzv3RBDvyGR5I4d7v2n8dI3+fY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0470f36b02ef01d4f43c641bbf07020bcab71bf1", + "rev": "17a689596b72d1906883484838eb1aaf51ab8001", "type": "github" }, "original": { diff --git a/shared/activation.nix b/shared/activation.nix new file mode 100644 index 0000000..5d83539 --- /dev/null +++ b/shared/activation.nix @@ -0,0 +1,7 @@ +{ lib, pkgs, ... }: +{ + 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) + ''; +} diff --git a/shared/default.nix b/shared/default.nix index 9353fb3..ea774a0 100644 --- a/shared/default.nix +++ b/shared/default.nix @@ -2,6 +2,7 @@ { programs.nix-index-database.comma.enable = true; imports = [ + ./activation.nix ./caches.nix ./gpg.nix ./sops.nix diff --git a/users/rouven/default.nix b/users/rouven/default.nix index e276dfa..6dfeed2 100644 --- a/users/rouven/default.nix +++ b/users/rouven/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { imports = [ ./fixes.nix ]; nixpkgs.config.allowUnfree = true; @@ -6,6 +6,10 @@ isNormalUser = true; extraGroups = [ "wheel" "video" "libvirtd" ]; }; + system.activationScripts.report-home-manager-changes = '' + PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]} + nvd diff $(ls -dv /nix/var/nix/profiles/per-user/rouven/home-manager-*-link | tail -2) + ''; home-manager.useUserPackages = true; home-manager.useGlobalPkgs = true;