I would like to add RandomizedDelaySec = "7day"; FixedRandomizedDelay = "yes";
to the configuration of the zfs-trim.timer
unit that is automatically produced by services.zfs.trim.enabled = true;
. Here is what I have tried:
With this one, there was no evidence of my values:
services.zfs.trim = {
# I know these are default values,
# just putting them here for illustration
enable = true;
interval = "weekly";
};
systemd.timers."zfs-trim" = {
timerConfig = {
RandomizedDelaySec = "7day";
FixedRandomizedDelay = "yes";
};
};
With this one, the nixos-rebuild
command hangs for a while and then gives up with stack overflow/possible infinite recursion:
services.zfs.trim = {
enable = true;
interval = "weekly";
};
systemd.timers."zfs-trim" = lib.mkOverride {
timerConfig = {
RandomizedDelaySec = "7day";
FixedRandomizedDelay = "yes";
};
};
With this one I get the error error: anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:721:33 called with unexpected argument 'priority'
and with --show-trace
, a huge stack trace that I have no idea how to interpret.
services.zfs.trim = {
enable = true;
interval = "weekly";
};
systemd.timers."zfs-trim" = lib.mkAfter {
timerConfig = {
RandomizedDelaySec = "7day";
FixedRandomizedDelay = "yes";
};
};
What is the right way to achieve what I seek here?
Thanks!