Shea Levy 2012-11-22 02:07:25 -05:00
parent 60bf4c3cd7
commit cd513482d4
2 changed files with 27 additions and 0 deletions

View File

@ -48,6 +48,7 @@
./security/pam.nix ./security/pam.nix
./security/pam_usb.nix ./security/pam_usb.nix
./security/polkit.nix ./security/polkit.nix
./security/rngd.nix
./security/rtkit.nix ./security/rtkit.nix
./security/setuid-wrappers.nix ./security/setuid-wrappers.nix
./security/sudo.nix ./security/sudo.nix

26
modules/security/rngd.nix Normal file
View File

@ -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";
};
};
}