fixing clean up bug

This commit is contained in:
ari committed 2026-11-01 14:10:17 -05:00
1 parent 563dd7a759
commit d7f5dba677
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -159,6 +159,8 @@ func (l *Local) Start(ctx context.Context, spec node.StartSpec) error {
// Only the home folder persists. NixOS rebuilds the rest on boot.
root := filepath.Join(l.cfg.MachinesDir, spec.Machine)
// NixOS marks /var/empty immutable, which blocks RemoveAll.
_ = exec.Command("chattr", "-i", filepath.Join(root, "var/empty")).Run()
if err := os.RemoveAll(root); err != nil {
return fmt.Errorf("clearing old container files: %w", err)
}