mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos: Make system.build.vm a standard attribute based on vmVariant
This commit is contained in:
parent
4014fb6a64
commit
6510ec5acd
@ -45,11 +45,6 @@
|
|||||||
system.nixos.versionSuffix =
|
system.nixos.versionSuffix =
|
||||||
".${final.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}.${self.shortRev or "dirty"}";
|
".${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.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;
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
@ -16,7 +16,5 @@ in
|
|||||||
|
|
||||||
system = eval.config.system.build.toplevel;
|
system = eval.config.system.build.toplevel;
|
||||||
|
|
||||||
vm = eval.config.virtualisation.vmVariant.system.build.vm;
|
inherit (eval.config.system.build) vm vmWithBootLoader;
|
||||||
|
|
||||||
vmWithBootLoader = eval.config.virtualisation.vmVariantWithBootLoader.system.build.vm;
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ extendModules, lib, ... }:
|
{ config, extendModules, lib, ... }:
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (lib)
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user