From 10b0df38b4286237b56ff9177f8d4c5676bfb5c1 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 30 Oct 2023 04:22:32 -0400 Subject: tree-wide: refactor i went overboard on modules. this is much comfier --- modules/nixos/hardware/ssd.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 modules/nixos/hardware/ssd.nix (limited to 'modules/nixos/hardware/ssd.nix') diff --git a/modules/nixos/hardware/ssd.nix b/modules/nixos/hardware/ssd.nix new file mode 100644 index 0000000..7279a12 --- /dev/null +++ b/modules/nixos/hardware/ssd.nix @@ -0,0 +1,14 @@ +{ + config, + lib, + ... +}: let + cfg = config.hardware.ssd; + inherit (lib) mkEnableOption mkIf; +in { + options.hardware.ssd.enable = mkEnableOption "ssd settings"; + + config = mkIf cfg.enable { + services.fstrim.enable = true; + }; +} -- cgit v1.2.3