unstable-packages: store version in system derivation output

This commit is contained in:
Wroclaw 2024-05-14 06:57:27 +02:00
parent 30bee709a5
commit 1cc877bddb

View file

@ -31,6 +31,7 @@ in
};
};
config._module.args.unstablePkgs = config.unstable.pkgs;
# FIXME: move it to the system derivation output (overrideAttrs config.system.build.toplevel?)
config.environment.etc."NIXOS-UNSTABLE-VERSION".text = nixos-unstable-version;
config.system.extraSystemBuilderCmds = lib.mkIf config.unstable.enable ''
echo ${nixos-unstable-version} > $out/nixos-unstable-version
'';
}