Archived
fix(ipa): skip home-manager-wayne service when home dir absent
Check NixOS configurations / eval-hosts (pull_request) Failing after 9m42s
Check NixOS configurations / eval-hosts (pull_request) Failing after 9m42s
On first enrollment /home/wayne doesn't exist until the IPA user's first login (pam_mkhomedir creates it). home-manager-<user>.service cd's into the home dir immediately and fails with ENOENT, causing the whole rebuild activation to return exit code 4. Add ConditionPathExists so systemd skips the service (condition not met, no failure) instead. After first login the dir exists and subsequent rebuilds activate Home Manager normally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -153,6 +153,14 @@ lib.mkIf enabled {
|
|||||||
createHome = false;
|
createHome = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# home-manager-<user>.service fails on first enrollment because /home/wayne
|
||||||
|
# doesn't exist until the user's first login (pam_mkhomedir creates it then).
|
||||||
|
# ConditionPathExists makes systemd skip the service (exit 0, condition not
|
||||||
|
# met) instead of failing. After first login the dir exists and subsequent
|
||||||
|
# rebuilds activate HM normally.
|
||||||
|
systemd.services."home-manager-${vars.ipaUser}".unitConfig.ConditionPathExists =
|
||||||
|
"/home/${vars.ipaUser}";
|
||||||
|
|
||||||
security.sudo.extraRules = [{
|
security.sudo.extraRules = [{
|
||||||
users = [ vars.ipaUser ];
|
users = [ vars.ipaUser ];
|
||||||
commands = [{ command = "ALL"; options = [ "NOPASSWD" ]; }];
|
commands = [{ command = "ALL"; options = [ "NOPASSWD" ]; }];
|
||||||
|
|||||||
Reference in New Issue
Block a user