From fa7615023554f6ab140ee0cd7728551beb3be56c Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Sun, 23 Feb 2020 18:53:52 -0500 Subject: [PATCH] nixos/rngd: fix clean shutdown It seems disabling DefaultDependencies removes these implicit dependencies [0] that we needed for shutdown to happen cleanly. Fixes #80871 [0]: https://www.freedesktop.org/software/systemd/man/systemd.service.html#Default%20Dependencies --- nixos/modules/security/rngd.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/modules/security/rngd.nix b/nixos/modules/security/rngd.nix index 5566c53897dc..cffa1a5849f9 100644 --- a/nixos/modules/security/rngd.nix +++ b/nixos/modules/security/rngd.nix @@ -37,6 +37,13 @@ in after = [ "dev-random.device" ]; + # Clean shutdown without DefaultDependencies + conflicts = [ "shutdown.target" ]; + before = [ + "sysinit.target" + "shutdown.target" + ]; + description = "Hardware RNG Entropy Gatherer Daemon"; # rngd may have to start early to avoid entropy starvation during boot with encrypted swap