nixpkgs/modules/security/rngd.nix

27 lines
584 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
with pkgs.lib;
{
options = {
security.rngd.enable = mkOption {
default = false;
description = ''
2012-11-22 10:41:54 +01:00
Whether to enable the rng daemon, which adds entropy from
hardware sources of randomness to the kernel entropy pool when
available.
'';
};
};
config = mkIf config.security.rngd.enable {
boot.systemd.services.rngd = {
2012-11-22 10:41:54 +01:00
wantedBy = [ "multi-user.target" ];
description = "Hardware RNG Entropy Gatherer Daemon";
serviceConfig.ExecStart = "${pkgs.rng_tools}/sbin/rngd -f";
};
};
}