linux-builder: upgrade working directory

The working directory was still using an old name of the project, which
made it uneccessary hard to understand why that directory was used
exactly.
This commit is contained in:
‮rekcäH nitraM‮ 2025-03-24 21:32:40 +01:00 committed by Michael Hoang
parent ebb88c3428
commit a175c68f3f

View file

@ -144,7 +144,7 @@ in
workingDirectory = mkOption {
type = types.str;
default = "/var/lib/darwin-builder";
default = "/var/lib/linux-builder";
description = ''
The working directory of the Linux builder daemon process.
'';
@ -168,6 +168,11 @@ in
];
system.activationScripts.preActivation.text = ''
# Migrate if using the old working directory
if [ -e /var/lib/darwin-builder ] && [ ! -e ${cfg.workingDirectory} ]; then
mv /var/lib/darwin-builder ${cfg.workingDirectory}
fi
mkdir -p ${cfg.workingDirectory}
'';