0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-12 05:16:25 +03:00

nixos/kmonad: make sure new config is used after nixos-rebuild switch

This commit is contained in:
Lin Jian 2025-01-01 12:28:07 +08:00
parent e695d85eb3
commit 280715cf39
No known key found for this signature in database
GPG key ID: A6698D36434F75A5

View file

@ -155,6 +155,19 @@ let
config.users.groups.uinput.name config.users.groups.uinput.name
] ++ keyboard.extraGroups; ] ++ keyboard.extraGroups;
}; };
# make sure the new config is used after nixos-rebuild switch
# stopIfChanged controls[0] how a service is "restarted" during
# nixos-rebuild switch. By default, stopIfChanged is true, which stops
# the old service and then starts the new service after config updates.
# Since we use path-based activation[1] here, the service unit will
# immediately[2] be started by the path unit. Probably that start is
# before config updates, whcih causes the service unit to use the old
# config after nixos-rebuild switch. Setting stopIfChanged to false works
# around this issue by restarting the service after config updates.
# [0]: https://nixos.org/manual/nixos/unstable/#sec-switching-systems
# [1]: man 7 daemon
# [2]: man 5 systemd.path
stopIfChanged = false;
}; };
in in
{ {