forked from mirrors_public/oddlama_nix-config
feat: back to qemu, cloud-hypervisor has issues with stopping
automatically (kernel panics) and sometimes shared files are not available causing ssh to not work because libraries are missing
This commit is contained in:
parent
21375353a8
commit
140b0d06e1
2 changed files with 12 additions and 3 deletions
|
@ -1,9 +1,18 @@
|
|||
_guestName: guestCfg: {lib, ...}: let
|
||||
_guestName: guestCfg: {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkForce;
|
||||
in {
|
||||
node.name = guestCfg.nodeName;
|
||||
node.type = guestCfg.backend;
|
||||
|
||||
# Set early hostname too, so we can associate those logs to this host and don't get "localhost" entries in loki
|
||||
boot.kernelParams = lib.mkIf (!config.boot.isContainer) [
|
||||
"systemd.hostname=${config.networking.hostName}"
|
||||
];
|
||||
|
||||
nix = {
|
||||
settings.auto-optimise-store = mkForce false;
|
||||
optimise.automatic = mkForce false;
|
||||
|
|
|
@ -29,10 +29,10 @@ in {
|
|||
lib.microvm.mac = guestCfg.microvm.mac;
|
||||
|
||||
microvm = {
|
||||
hypervisor = mkDefault "cloud-hypervisor";
|
||||
hypervisor = mkDefault "qemu";
|
||||
|
||||
# Give them some juice by default
|
||||
mem = mkDefault 2048;
|
||||
mem = mkDefault (1024 + 2048);
|
||||
|
||||
# Add a writable store overlay, but since this is always ephemeral
|
||||
# disable any store optimization from nix.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue