This repository has been archived by the owner on Aug 27, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ config, pkgs, ... }: | ||
|
||
with pkgs.lib; | ||
|
||
{ | ||
options = { | ||
security.rngd.enable = mkOption { | ||
default = true; | ||
description = '' | ||
Whether tho enable the rng daemon, which adds entropy from | ||
hardware sources of randomness to the kernel entropy pool when | ||
available. It is strongly recommended to keep this enabled! | ||
''; | ||
}; | ||
}; | ||
|
||
config = mkIf config.security.rngd.enable { | ||
boot.systemd.services.rngd = { | ||
wantedBy = [ config.boot.systemd.defaultUnit ]; | ||
|
||
description = "Hardware RNG Entropy Gatherer Daemon"; | ||
|
||
serviceConfig.ExecStart = "${pkgs.rng_tools}/sbin/rngd -f"; | ||
}; | ||
}; | ||
} |