diff --git a/modules/nixos/hardware/default.nix b/modules/nixos/hardware/default.nix index 6d3f9f0..1353ec9 100644 --- a/modules/nixos/hardware/default.nix +++ b/modules/nixos/hardware/default.nix @@ -3,6 +3,7 @@ imports = [ ./audio.nix ./boot.nix + ./disk.nix ./keyboard.nix ./monitors.nix ./mouse.nix diff --git a/modules/nixos/hardware/disk.nix b/modules/nixos/hardware/disk.nix new file mode 100644 index 0000000..079823d --- /dev/null +++ b/modules/nixos/hardware/disk.nix @@ -0,0 +1,7 @@ +{ config, pkgs, lib, ... }: { + + # Enable fstrim, which tracks free space on SSDs for garbage collection + # More info: https://www.reddit.com/r/NixOS/comments/rbzhb1/if_you_have_a_ssd_dont_forget_to_enable_fstrim/ + services.fstrim.enable = true; + +}