summary refs log tree commit diff
path: root/nixos/modules/system/boot/systemd.nix
diff options
context:
space:
mode:
authorlf- <lf-@users.noreply.github.com>2020-10-31 01:25:51 -0700
committerNiklas Hambüchen <mail@nh2.me>2020-10-31 16:50:35 +0100
commit644079e707a1673f0f69508b5378e06949c7c61e (patch)
treec2e08000319039b0b45eaa44f7829bc6548f7641 /nixos/modules/system/boot/systemd.nix
parentc178fe4bbb9e55f2a67260238b975264497d0f9a (diff)
downloadnixpkgs-644079e707a1673f0f69508b5378e06949c7c61e.tar
nixpkgs-644079e707a1673f0f69508b5378e06949c7c61e.tar.gz
nixpkgs-644079e707a1673f0f69508b5378e06949c7c61e.tar.bz2
nixpkgs-644079e707a1673f0f69508b5378e06949c7c61e.tar.lz
nixpkgs-644079e707a1673f0f69508b5378e06949c7c61e.tar.xz
nixpkgs-644079e707a1673f0f69508b5378e06949c7c61e.tar.zst
nixpkgs-644079e707a1673f0f69508b5378e06949c7c61e.zip
nixos/modules: deprecation warning for StartLimitInterval in [Service]
This implements
https://github.com/NixOS/nixpkgs/issues/45786#issuecomment-440091879
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r--nixos/modules/system/boot/systemd.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index a66176aff45..c22264b3e92 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -892,11 +892,15 @@ in
           let
             type = service.serviceConfig.Type or "";
             restart = service.serviceConfig.Restart or "no";
+            hasDeprecated = builtins.hasAttr "StartLimitInterval" service.serviceConfig;
           in
             concatLists [
               (optional (type == "oneshot" && (restart == "always" || restart == "on-success"))
                 "Service '${name}.service' with 'Type=oneshot' cannot have 'Restart=always' or 'Restart=on-success'"
               )
+              (optional hasDeprecated
+                "Service '${name}.service' uses the attribute 'StartLimitInterval' in the Service section, which is deprecated. See https://github.com/NixOS/nixpkgs/issues/45786."
+              )
             ]
         )
         cfg.services