diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index ffa6d76481d..6c6adab66e7 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -688,8 +688,7 @@ in config = { assertions = mapAttrsToList (name: service: { - assertion = service.serviceConfig.Type or "" == "oneshot" -> - builtins.elem (service.serviceConfig.Restart or "no") ["no" "on-failure" "on-abort"]; + assertion = service.serviceConfig.Type or "" == "oneshot" -> service.serviceConfig.Restart or "no" == "no"; message = "${name}: Type=oneshot services must have Restart=no"; }) cfg.services;