feat(hardware): add ssd module to hardware

This commit is contained in:
ooks-io 2024-04-07 23:09:43 +12:00
parent 72011ba30a
commit ea48575dd0

View file

@ -0,0 +1,26 @@
{ lib, config, ... }:
let
cfg = config.systemModules.hardware.ssd;
inherit (lib) mkIf mkEnableOption;
in
{
options.systemModules.hardware.ssd = {
enable = mkEnableOption "Enable bluetooth module";
};
config = mkIf cfg.enable {
services.fstrim = {
enable = true;
};
# only run fstrim while connected on AC
systemd.services.fstrim = {
unitConfig.ConditionACPower = true;
serviceConfig = {
Nice = 19;
IOSchedulingClass = "idle";
};
};
};
}