mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
54 lines
1.9 KiB
Nix
54 lines
1.9 KiB
Nix
{ lib, config, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.services.esdm;
|
|
in
|
|
{
|
|
imports = [
|
|
# removed option 'services.esdm.cuseRandomEnable'
|
|
(lib.mkRemovedOptionModule [ "services" "esdm" "cuseRandomEnable" ] ''
|
|
Use services.esdm.enableLinuxCompatServices instead.
|
|
'')
|
|
# removed option 'services.esdm.cuseUrandomEnable'
|
|
(lib.mkRemovedOptionModule [ "services" "esdm" "cuseUrandomEnable" ] ''
|
|
Use services.esdm.enableLinuxCompatServices instead.
|
|
'')
|
|
# removed option 'services.esdm.procEnable'
|
|
(lib.mkRemovedOptionModule [ "services" "esdm" "procEnable" ] ''
|
|
Use services.esdm.enableLinuxCompatServices instead.
|
|
'')
|
|
# removed option 'services.esdm.verbose'
|
|
(lib.mkRemovedOptionModule [ "services" "esdm" "verbose" ] ''
|
|
There is no replacement.
|
|
'')
|
|
];
|
|
|
|
options.services.esdm = {
|
|
enable = lib.mkEnableOption "ESDM service configuration";
|
|
package = lib.mkPackageOption pkgs "esdm" { };
|
|
enableLinuxCompatServices = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = ''
|
|
Enable /dev/random, /dev/urandom and /proc/sys/kernel/random/* userspace wrapper.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable (
|
|
lib.mkMerge [
|
|
({
|
|
systemd.packages = [ cfg.package ];
|
|
systemd.services."esdm-server".wantedBy = [ "basic.target" ];
|
|
})
|
|
# It is necessary to set those options for these services to be started by systemd in NixOS
|
|
(lib.mkIf cfg.enableLinuxCompatServices {
|
|
systemd.targets."esdm-linux-compat".wantedBy = [ "basic.target" ];
|
|
systemd.services."esdm-server-suspend".wantedBy = [ "sleep.target" "suspend.target" "hibernate.target" ];
|
|
systemd.services."esdm-server-resume".wantedBy = [ "sleep.target" "suspend.target" "hibernate.target" ];
|
|
})
|
|
]);
|
|
|
|
meta.maintainers = with lib.maintainers; [ orichter thillux ];
|
|
}
|