nixos/services.haveged: remove with lib;

This commit is contained in:
Felix Buehler
2024-12-30 12:09:40 +01:00
parent 1c7eaa7b7a
commit f155ae804a
+4 -7
View File
@@ -4,9 +4,6 @@
pkgs,
...
}:
with lib;
let
cfg = config.services.haveged;
@@ -20,14 +17,14 @@ in
services.haveged = {
enable = mkEnableOption ''
enable = lib.mkEnableOption ''
haveged entropy daemon, which refills /dev/random when low.
NOTE: does nothing on kernels newer than 5.6
'';
# source for the note https://github.com/jirka-h/haveged/issues/57
refill_threshold = mkOption {
type = types.int;
refill_threshold = lib.mkOption {
type = lib.types.int;
default = 1024;
description = ''
The number of bits of available entropy beneath which
@@ -39,7 +36,7 @@ in
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# https://github.com/jirka-h/haveged/blob/a4b69d65a8dfc5a9f52ff8505c7f58dcf8b9234f/contrib/Fedora/haveged.service
systemd.services.haveged = {