Skip to content

Commit

Permalink
Dedupe the WorkingDirectory path of the linux-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
tfc committed Jan 14, 2024
1 parent 0dd382b commit 0d05108
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/nix/linux-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ let
modules = [ cfg.config ];
};

WorkingDirectory = "/var/lib/darwin-builder";

# create-builder uses TMPDIR to share files with the builder, notably certs.
# macOS will clean up files in /tmp automatically that haven't been accessed in 3+ days.
# If we let it use /tmp, leaving the computer asleep for 3 days makes the certs vanish.
Expand Down Expand Up @@ -89,7 +91,7 @@ in
} ];

system.activationScripts.preActivation.text = ''
mkdir -p /var/lib/darwin-builder
mkdir -p ${WorkingDirectory}
'';

launchd.daemons.linux-builder = {
Expand All @@ -103,7 +105,7 @@ in
];
KeepAlive = true;
RunAtLoad = true;
WorkingDirectory = "/var/lib/darwin-builder";
inherit WorkingDirectory;
};
};

Expand Down

0 comments on commit 0d05108

Please sign in to comment.