base: stabilize system.build.toplevel.outPath for vmVariant
This is done by not depending on the flake itself, allowing the bits of a dirty tree to not affect the hash. This enables equivalence testing with `just eval-vm bob` and checking if the system closure hash changes or not.
This commit is contained in:
17
base/nix.nix
17
base/nix.nix
@@ -1,4 +1,4 @@
|
||||
{ inputs, ... }:
|
||||
{ lib, config, inputs, ... }:
|
||||
{
|
||||
nix = {
|
||||
gc = {
|
||||
@@ -21,11 +21,16 @@
|
||||
** use the same channel the system
|
||||
** was built with
|
||||
*/
|
||||
registry = {
|
||||
"nixpkgs".flake = inputs.nixpkgs;
|
||||
"nixpkgs-unstable".flake = inputs.nixpkgs-unstable;
|
||||
"pvv-nix".flake = inputs.self;
|
||||
};
|
||||
registry = lib.mkMerge [
|
||||
{
|
||||
"nixpkgs".flake = inputs.nixpkgs;
|
||||
"nixpkgs-unstable".flake = inputs.nixpkgs-unstable;
|
||||
}
|
||||
# We avoid the reference to self in vmVariant to get a stable system .outPath for equivalence testing
|
||||
(lib.mkIf (!config.virtualisation.isVmVariant) {
|
||||
"pvv-nix".flake = inputs.self;
|
||||
})
|
||||
];
|
||||
nixPath = [
|
||||
"nixpkgs=${inputs.nixpkgs}"
|
||||
"unstable=${inputs.nixpkgs-unstable}"
|
||||
|
Reference in New Issue
Block a user