Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

Commit

Permalink
Add rngd service.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Nov 22, 2012
1 parent 60bf4c3 commit cd51348
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/module-list.nix
Expand Up @@ -48,6 +48,7 @@
./security/pam.nix
./security/pam_usb.nix
./security/polkit.nix
./security/rngd.nix
./security/rtkit.nix
./security/setuid-wrappers.nix
./security/sudo.nix
Expand Down
26 changes: 26 additions & 0 deletions modules/security/rngd.nix
@@ -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";
};
};
}

0 comments on commit cd51348

Please sign in to comment.