until comin status --json | jq -e '.deployer.deployment.generation.selected_commit_id == "$H" and (.deployer.deployment.status == "done" or .deployer.deployment.status == "failed")' >/dev/null; do sleep 10; done
All checks were successful
nixos / nixos (push) Successful in 21s

comin status --json | jq -r '.deployer.deployment.status'
loginctl list-users --no-legend | awk '{print \$2, \$3}' | tr '\n' ' '; echo
ls /var/lib/systemd/linger
EOF
git log --oneline -1
nixos: keep the login users' systemd managers running (linger)

Every SSH login starts a user's systemd manager and the logout stops it:
a git push as git, a CI deploy, an admin session. A switch that reloads
user units while one is starting or stopping fails with status 4
although the system did switch, and comin reports the deployment as
failed; at 08:50 a push as git did this on ops and the "Deploy failing"
alert mailed. With linger the managers run permanently.

Assisted-by: Claude:opus-5-5
This commit is contained in:
Sergei Poljanski 2026-11-17 13:11:13 +04:00
commit 368393eaca
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -173,6 +173,15 @@ in
}; };
config = { config = {
# Their systemd user managers run permanently. Otherwise each SSH
# login (a git push as git, a CI deploy, an admin session) starts
# and stops one, and a switch that reloads user units at that moment
# fails with status 4 although the system switched; comin then
# reports the deployment as failed.
users.users = lib.genAttrs config.asxpio.security.loginUsers (_: {
linger = true;
});
asxpio.security.loginUsers = [ asxpio.security.loginUsers = [
"root" "root"
"asxpi" "asxpi"