diff options
author | lf- <lf-@users.noreply.github.com> | 2020-10-31 01:25:51 -0700 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2020-10-31 16:50:35 +0100 |
commit | 644079e707a1673f0f69508b5378e06949c7c61e (patch) | |
tree | c2e08000319039b0b45eaa44f7829bc6548f7641 /nixos | |
parent | c178fe4bbb9e55f2a67260238b975264497d0f9a (diff) | |
download | nixpkgs-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')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 4 |
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 |