mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-19 19:52:28 +03:00
27 lines
645 B
Nix
27 lines
645 B
Nix
|
{ 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";
|
||
|
};
|
||
|
};
|
||
|
}
|