2023-11-29 18:37:42 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
2023-12-15 18:40:18 +00:00
|
|
|
cfg = config.myFlake.hardware.components.misc.fstrim;
|
2023-11-29 18:37:42 +00:00
|
|
|
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.";
|
2023-11-29 18:37:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.fstrim.enable = true;
|
|
|
|
};
|
|
|
|
}
|