blob: 9aae7b33a4304b406f223f99df9af99c1a49117f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 ];
};
}
|