frandom: very fast kernel random number generator
svn path=/nixos/trunk/; revision=32084
This commit is contained in:
parent
4f7985a1bd
commit
49a3e57d43
@ -149,6 +149,7 @@
|
||||
./services/scheduling/atd.nix
|
||||
./services/scheduling/cron.nix
|
||||
./services/scheduling/fcron.nix
|
||||
./services/security/frandom.nix
|
||||
./services/security/tor.nix
|
||||
./services/security/torsocks.nix
|
||||
./services/system/cgroups.nix
|
||||
|
31
modules/services/security/frandom.nix
Normal file
31
modules/services/security/frandom.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{pkgs, config, ...}:
|
||||
|
||||
let kernel = config.boot.kernelPackages;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.frandom.enable = pkgs.lib.mkOption {
|
||||
default = false;
|
||||
type = pkgs.lib.types.bool;
|
||||
description = ''
|
||||
enable the /dev/frandom device (a very fast random number generator)
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = pkgs.lib.mkIf config.services.frandom.enable {
|
||||
boot.kernelModules = [ "frandom" ];
|
||||
boot.extraModulePackages = [ kernel.frandom ];
|
||||
services.udev.packages = [ kernel.frandom ];
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user