We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 901c80e commit 5103fadCopy full SHA for 5103fad
nixos-modules/host/default.nix
@@ -72,9 +72,9 @@ in
72
];
73
partOf = [ "microvm@${name}.service" ];
74
wantedBy = [ "microvms.target" ];
75
- # Only run this if the MicroVM is fully-declarative
76
- # or /var/lib/microvms/$name does not exist yet.
77
- unitConfig.ConditionPathExists = lib.mkIf isFlake "!${stateDir}/${name}";
+ # Run on every rebuild for fully-declarative MicroVMs and flake-based MicroVMs without updateFlake.
+ # For MicroVMs with updateFlake set, only run on initial installation.
+ unitConfig.ConditionPathExists = lib.mkIf (isFlake && updateFlake != null) "!${stateDir}/${name}";
78
serviceConfig.Type = "oneshot";
79
script = ''
80
mkdir -p ${stateDir}/${name}
0 commit comments