2012-11-22 07:07:25 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
security.rngd.enable = mkOption {
|
|
|
|
default = true;
|
|
|
|
description = ''
|
2012-11-22 09:41:54 +00:00
|
|
|
Whether to enable the rng daemon, which adds entropy from
|
2012-11-22 07:07:25 +00:00
|
|
|
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 = {
|
2012-11-22 09:41:54 +00:00
|
|
|
wantedBy = [ "multi-user.target" ];
|
2012-11-22 07:07:25 +00:00
|
|
|
|
|
|
|
description = "Hardware RNG Entropy Gatherer Daemon";
|
|
|
|
|
|
|
|
serviceConfig.ExecStart = "${pkgs.rng_tools}/sbin/rngd -f";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|