fix: set correct working directory and create home for ai-worker

This commit is contained in:
Robert
2026-04-04 17:07:13 -04:00
parent ce20fad4d3
commit 2e749228bb
2 changed files with 3 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ in {
Type = "exec"; Type = "exec";
User = cfg.user; User = cfg.user;
Group = cfg.user; Group = cfg.user;
WorkingDirectory = "/var/lib/${cfg.user}"; WorkingDirectory = "/home/${cfg.user}";
ExecStart = '' ExecStart = ''
${openclawPkg}/bin/openclaw \ ${openclawPkg}/bin/openclaw \
node run \ node run \

View File

@@ -2,6 +2,8 @@
users.users.ai-worker = { users.users.ai-worker = {
isSystemUser = true; isSystemUser = true;
group = "ai-worker"; group = "ai-worker";
home = "/home/ai-worker";
createHome = true;
extraGroups = [ "docker" ]; extraGroups = [ "docker" ];
shell = pkgs.bashInteractive; shell = pkgs.bashInteractive;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [