about summary refs log tree commit diff
path: root/nixos/lib/systemd-lib.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/lib/systemd-lib.nix')
-rw-r--r--nixos/lib/systemd-lib.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/lib/systemd-lib.nix b/nixos/lib/systemd-lib.nix
index dac5cc7b700c..f75a52a95a09 100644
--- a/nixos/lib/systemd-lib.nix
+++ b/nixos/lib/systemd-lib.nix
@@ -169,6 +169,10 @@ in rec {
     optional (attr ? ${name} && !isInt attr.${name})
       "Systemd ${group} field `${name}' is not an integer";
 
+  assertRemoved = name: see: group: attr:
+    optional (attr ? ${name})
+      "Systemd ${group} field `${name}' has been removed. See ${see}";
+
   checkUnitConfig = group: checks: attrs: let
     # We're applied at the top-level type (attrsOf unitOption), so the actual
     # unit options might contain attributes from mkOverride and mkIf that we need to