From bf841cd892c099ac674184ee31c7352cb62dad0a Mon Sep 17 00:00:00 2001
From: Mathijs Kwik <mathijs@bluescreen303.nl>
Date: Fri, 18 Apr 2014 21:42:22 +0200
Subject: [PATCH] Revert "systemd: oneshot units should be allowed to restart
 on failure/abort"

This reverts commit c1e638abb67d51320907c1245992bea4a8694c83.

As pointed out by wkennington, upstream disallows all cases as of v207
---
 nixos/modules/system/boot/systemd.nix | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index ffa6d76481dc..6c6adab66e7c 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;