forked from c3d2/nix-config
flake.nix: fix *-vm package
This commit is contained in:
parent
302a7b227e
commit
ed35be3bcf
45
flake.nix
45
flake.nix
|
@ -463,32 +463,31 @@
|
|||
# boot any machine in a microvm
|
||||
"${host}-vm" = (self.nixosConfigurations.${host}
|
||||
.extendModules {
|
||||
modules = [
|
||||
microvm.nixosModules.microvm
|
||||
{
|
||||
microvm = {
|
||||
mem = nixos.lib.mkForce 2048;
|
||||
hypervisor = nixos.lib.mkForce "qemu";
|
||||
socket = nixos.lib.mkForce null;
|
||||
shares = nixos.lib.mkForce [ {
|
||||
tag = "ro-store";
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
} ];
|
||||
interfaces = nixos.lib.mkForce [ {
|
||||
type = "user";
|
||||
id = "eth0";
|
||||
mac = "02:23:de:ad:be:ef";
|
||||
} ];
|
||||
};
|
||||
boot.isContainer = lib.mkForce false;
|
||||
users.users.root.password = "";
|
||||
fileSystems."/".fsType = lib.mkForce "tmpfs";
|
||||
services.getty.helpLine = ''
|
||||
modules = [ {
|
||||
microvm = {
|
||||
mem = nixos.lib.mkForce 2048;
|
||||
hypervisor = nixos.lib.mkForce "qemu";
|
||||
socket = nixos.lib.mkForce null;
|
||||
shares = nixos.lib.mkForce [ {
|
||||
tag = "ro-store";
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
} ];
|
||||
interfaces = nixos.lib.mkForce [ {
|
||||
type = "user";
|
||||
id = "eth0";
|
||||
mac = "02:23:de:ad:be:ef";
|
||||
} ];
|
||||
};
|
||||
boot.isContainer = lib.mkForce false;
|
||||
users.users.root.password = "";
|
||||
fileSystems."/".fsType = lib.mkForce "tmpfs";
|
||||
services.getty.helpLine = ''
|
||||
Log in as "root" with an empty password.
|
||||
Use "reboot" to shut qemu down.
|
||||
'';
|
||||
}
|
||||
} ] ++ lib.optionals (! config ? microvm) [
|
||||
microvm.nixosModules.microvm
|
||||
];
|
||||
})
|
||||
.config.microvm.declaredRunner;
|
||||
|
|
Loading…
Reference in New Issue