mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
49a3e57d43
svn path=/nixos/trunk/; revision=32084
32 lines
568 B
Nix
32 lines
568 B
Nix
{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 ];
|
|
};
|
|
|
|
}
|