Skip to content

Commit

Permalink
Merge pull request #24 from Luflosi/disable-auto-start
Browse files Browse the repository at this point in the history
makeDarwinImage: allow not starting the macOS VM automatically
  • Loading branch information
MatthewCroughan authored Mar 6, 2024
2 parents 62ba30e + 18e031c commit b384ebc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion makeDarwinImage/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ in
Whether to open the sshPort and vncDisplayNumber on the networking.firewall
'';
};
autoStart = lib.mkOption {
type = lib.types.bool;
default = true;
description = lib.mdDoc ''
Whether to automatically start the VM after booting the host machine.
'';
};
};
config = let
run-macos = cfg.package.makeRunScript {
Expand All @@ -112,7 +119,7 @@ in
rm -f *.qcow2
'';
description = "macOS Ventura";
wantedBy = [ "multi-user.target" ];
wantedBy = lib.optionals cfg.autoStart [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${lib.getExe run-macos}";
Expand Down

0 comments on commit b384ebc

Please sign in to comment.