Is there a universal way to enable a service auto restart?

Hi, and thank you, but following error appears:

error: cannot coerce a set to a string, at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/systemd-lib.nix:65:8

which seems to complain that the type of lib.mkForce "always" is not compatiable to the required type of Restart.