move all expressions to nix/; include modularized home-manager config
This commit is contained in:
parent
d76a7f963b
commit
13bd5e9000
65 changed files with 1726 additions and 511 deletions
32
nix/tests/buildvmwithbootloader/build-vm.nix
Normal file
32
nix/tests/buildvmwithbootloader/build-vm.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ system ? builtins.currentSystem
|
||||
, vmPkgsPath
|
||||
, buildPkgsPath
|
||||
, nixosConfigPath
|
||||
}:
|
||||
|
||||
let
|
||||
buildPkgs = import buildPkgsPath {};
|
||||
vmPkgs'= import vmPkgsPath {};
|
||||
vmPkgs = vmPkgs' // {
|
||||
runtimeShell = "${vmPkgs'.bash}/${vmPkgs'.bash.shellPath}";
|
||||
};
|
||||
|
||||
importWithPkgs = { path, pkgs }: args: import path (args // { inherit pkgs; });
|
||||
|
||||
nixosConfig = importWithPkgs { path = "${nixosConfigPath}"; pkgs = vmPkgs; };
|
||||
vmConfig = importWithPkgs { path = "${buildPkgsPath}/nixos/modules/virtualisation/qemu-vm.nix"; pkgs = vmPkgs; };
|
||||
evalConfig = importWithPkgs { path = "${vmPkgsPath}/nixos/lib/eval-config.nix"; pkgs = null; };
|
||||
|
||||
vmWithBootLoaderConfigMixed = (evalConfig {
|
||||
modules = [
|
||||
nixosConfig
|
||||
vmConfig
|
||||
{
|
||||
virtualisation.useBootLoader = true;
|
||||
}
|
||||
|
||||
];
|
||||
}).config;
|
||||
in {
|
||||
vmWithBootLoaderMixed = vmWithBootLoaderConfigMixed.system.build.vm;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue