1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 11:10:03 +00:00

nixos: Make system.build.vm a standard attribute based on vmVariant

This commit is contained in:
Robert Hensing 2021-12-17 14:34:30 +01:00
parent 4014fb6a64
commit 6510ec5acd
3 changed files with 11 additions and 9 deletions

View file

@ -45,11 +45,6 @@
system.nixos.versionSuffix =
".${final.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}.${self.shortRev or "dirty"}";
system.nixos.revision = final.mkIf (self ? rev) self.rev;
system.build = {
vm = lib.mkDefault config.virtualisation.vmVariant.system.build.vm;
vmWithBootLoader = lib.mkDefault config.virtualisation.vmVariantWithBootLoader.system.build.vm;
};
})
];
});

View file

@ -16,7 +16,5 @@ in
system = eval.config.system.build.toplevel;
vm = eval.config.virtualisation.vmVariant.system.build.vm;
vmWithBootLoader = eval.config.virtualisation.vmVariantWithBootLoader.system.build.vm;
inherit (eval.config.system.build) vm vmWithBootLoader;
}

View file

@ -1,4 +1,4 @@
{ extendModules, lib, ... }:
{ config, extendModules, lib, ... }:
let
inherit (lib)
@ -43,4 +43,13 @@ in
};
};
config = {
system.build = {
vm = lib.mkDefault config.virtualisation.vmVariant.system.build.vm;
vmWithBootLoader = lib.mkDefault config.virtualisation.vmVariantWithBootLoader.system.build.vm;
};
};
}