From 644079e707a1673f0f69508b5378e06949c7c61e Mon Sep 17 00:00:00 2001 From: lf- Date: Sat, 31 Oct 2020 01:25:51 -0700 Subject: nixos/modules: deprecation warning for StartLimitInterval in [Service] This implements https://github.com/NixOS/nixpkgs/issues/45786#issuecomment-440091879 --- nixos/modules/system/boot/systemd.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nixos/modules/system/boot/systemd.nix') 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 -- cgit 1.4.1