🎨 (hydrogen/system) format nix settings file + enable experimental features

This commit is contained in:
Laureηt 2023-11-29 15:35:59 +01:00
parent 146076bad4
commit cc6d8f0545
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI

View file

@ -1,4 +1,4 @@
{ ... }: {
{ lib, pkgs, nixpkgs, ... }: {
# optimizations
nix.settings.auto-optimise-store = true;
@ -8,4 +8,16 @@
dates = "weekly";
options = "--delete-older-than 30d";
};
# experimental features
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# pin nixpkgs registry
nix.registry.nixpkgs.flake = nixpkgs;
# print diff between two generations
system.activationScripts.nvd-report-changes = ''
PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]}
nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2)
'';
}