nixos-config/fstrim.nix
2018-11-05 18:05:56 +01:00

16 lines
256 B
Nix

{ config, pkgs, ... }:
{
systemd.services.fstrimroot = {
path = [ pkgs.eject ];
restartIfChanged = false;
serviceConfig = {
Type = "oneshot";
};
script = "${pkgs.utillinux.bin}/bin/fstrim -v /";
startAt = "04:00";
};
}