refactor: flake dir -> outputs/sys -> nixos
This commit is contained in:
parent
3615bb010f
commit
a6d5e892a1
73 changed files with 9 additions and 2 deletions
23
nixos/modules/base/host/hardware/features/ssd.nix
Normal file
23
nixos/modules/base/host/hardware/features/ssd.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
features = config.ooknet.host.hardware.features;
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) elem;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (elem "ssd" features) {
|
||||
services.fstrim = {
|
||||
enable = true;
|
||||
};
|
||||
# only run fstrim while connected on AC
|
||||
systemd.services.fstrim = {
|
||||
unitConfig.ConditionACPower = true;
|
||||
serviceConfig = {
|
||||
Nice = 19;
|
||||
IOSchedulingClass = "idle";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue