nixos: flip && to prevent recursion errors
The recent change to add the ability to use systemd units for users made it so configs with home-manager.users dependent on config.users.users failed with recursion errors. Simply flipping the &&s so it avoids running the check if the feature is disabled fixes this.
This commit is contained in:
parent
57e99ed4a1
commit
e8e0f53079
1 changed files with 2 additions and 2 deletions
|
|
@ -89,7 +89,7 @@ in
|
|||
};
|
||||
}
|
||||
|
||||
(mkIf (cfg.users != { } && !cfg.startAsUserService) {
|
||||
(mkIf (!cfg.startAsUserService && cfg.users != { }) {
|
||||
systemd.services = lib.mapAttrs' (
|
||||
_: usercfg:
|
||||
let
|
||||
|
|
@ -140,7 +140,7 @@ in
|
|||
) cfg.users;
|
||||
})
|
||||
|
||||
(mkIf (cfg.users != { } && cfg.startAsUserService) {
|
||||
(mkIf (cfg.startAsUserService && cfg.users != { }) {
|
||||
systemd.user.services.home-manager = baseUnit "%u" // {
|
||||
# this _should_ depend on nix-daemon.socket, as the system-service
|
||||
# version of this unit does, but systemd doesn't allow user units
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue