flake/nixos/modules/hardware/components/misc/fstrim.nix

16 lines
308 B
Nix
Raw Normal View History

{
lib,
config,
...
}: let
2023-12-15 18:40:18 +00:00
cfg = config.myFlake.hardware.components.misc.fstrim;
in {
options = {
2023-12-15 18:40:18 +00:00
myFlake.hardware.components.misc.fstrim.enable = lib.mkEnableOption "Whether to enable SSD triming in background.";
};
config = lib.mkIf cfg.enable {
services.fstrim.enable = true;
};
}