1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

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:
oddlama 2024-01-06 16:59:08 +01:00
parent 21375353a8
commit 140b0d06e1
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 12 additions and 3 deletions

View file

@ -1,9 +1,18 @@
_guestName: guestCfg: {lib, ...}: let _guestName: guestCfg: {
config,
lib,
...
}: let
inherit (lib) mkForce; inherit (lib) mkForce;
in { in {
node.name = guestCfg.nodeName; node.name = guestCfg.nodeName;
node.type = guestCfg.backend; 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 = { nix = {
settings.auto-optimise-store = mkForce false; settings.auto-optimise-store = mkForce false;
optimise.automatic = mkForce false; optimise.automatic = mkForce false;

View file

@ -29,10 +29,10 @@ in {
lib.microvm.mac = guestCfg.microvm.mac; lib.microvm.mac = guestCfg.microvm.mac;
microvm = { microvm = {
hypervisor = mkDefault "cloud-hypervisor"; hypervisor = mkDefault "qemu";
# Give them some juice by default # Give them some juice by default
mem = mkDefault 2048; mem = mkDefault (1024 + 2048);
# Add a writable store overlay, but since this is always ephemeral # Add a writable store overlay, but since this is always ephemeral
# disable any store optimization from nix. # disable any store optimization from nix.