diff --git a/nixos-modules/host/default.nix b/nixos-modules/host/default.nix index 932c9720..d6427e37 100644 --- a/nixos-modules/host/default.nix +++ b/nixos-modules/host/default.nix @@ -241,7 +241,7 @@ in WorkingDirectory = "${stateDir}/%i"; ExecStart = "${stateDir}/%i/current/bin/microvm-run"; ExecStop = "${stateDir}/%i/booted/bin/microvm-shutdown"; - TimeoutSec = 150; + TimeoutSec = config.microvm.host.startupTimeout; Restart = "always"; RestartSec = "5s"; User = user; diff --git a/nixos-modules/host/options.nix b/nixos-modules/host/options.nix index cbbe5b10..6b197c82 100644 --- a/nixos-modules/host/options.nix +++ b/nixos-modules/host/options.nix @@ -9,6 +9,11 @@ Whether to enable the microvm.nix host module. ''; }; + host.startupTimeout = mkOption { + description = "Start up timeout for the VMs in seconds"; + type = types.ints.positive; + default = 150; + }; host.useNotifySockets = mkOption { type = types.bool;