9 cfg = config.services.esdm;
13 # removed option 'services.esdm.cuseRandomEnable'
14 (lib.mkRemovedOptionModule [ "services" "esdm" "cuseRandomEnable" ] ''
15 Use services.esdm.enableLinuxCompatServices instead.
17 # removed option 'services.esdm.cuseUrandomEnable'
18 (lib.mkRemovedOptionModule [ "services" "esdm" "cuseUrandomEnable" ] ''
19 Use services.esdm.enableLinuxCompatServices instead.
21 # removed option 'services.esdm.procEnable'
22 (lib.mkRemovedOptionModule [ "services" "esdm" "procEnable" ] ''
23 Use services.esdm.enableLinuxCompatServices instead.
25 # removed option 'services.esdm.verbose'
26 (lib.mkRemovedOptionModule [ "services" "esdm" "verbose" ] ''
27 There is no replacement.
31 options.services.esdm = {
32 enable = lib.mkEnableOption "ESDM service configuration";
33 package = lib.mkPackageOption pkgs "esdm" { };
34 enableLinuxCompatServices = lib.mkOption {
35 type = lib.types.bool;
38 Enable /dev/random, /dev/urandom and /proc/sys/kernel/random/* userspace wrapper.
43 config = lib.mkIf cfg.enable (
46 systemd.packages = [ cfg.package ];
47 systemd.services."esdm-server".wantedBy = [ "basic.target" ];
49 # It is necessary to set those options for these services to be started by systemd in NixOS
50 (lib.mkIf cfg.enableLinuxCompatServices {
51 systemd.targets."esdm-linux-compat".wantedBy = [ "basic.target" ];
52 systemd.services."esdm-server-suspend".wantedBy = [
57 systemd.services."esdm-server-resume".wantedBy = [
66 meta.maintainers = with lib.maintainers; [