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:
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;
|
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;
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue