From 05a92b0da1af6b822d99cc65db62dd77259d177d Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sat, 17 Feb 2024 10:15:46 +0100 Subject: [PATCH] do not restart VMs on change --- nixos/physical.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/nixos/physical.nix b/nixos/physical.nix index 72bdd94..1bf9b02 100644 --- a/nixos/physical.nix +++ b/nixos/physical.nix @@ -61,8 +61,18 @@ builtins.mapAttrs (name: vm: { - # TODO Simplify? - specialArgs = { inherit agenix disko pkgs lib microvm dns; machine = vm; hypervisorConfig = config; }; + # Do not restart virtual machines to apply configuration changes. + # While conceptually this seems useful, it could result in annoying situations. + # For example, changing the default VM configuration will restart ALL VMs simultaneously, causing a lot of stress on the servers. + # Downside of not restarting, is that we may need to do this manually now to apply changes. + restartIfChanged = false; + + specialArgs = { + inherit agenix disko pkgs lib microvm dns; + machine = vm; + hypervisorConfig = config; + }; + config.imports = [ ./. { networking.hostName = name; }