mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 09:17:14 +08:00 
			
		
		
		
	This will run TRIM once a week using a systemd timer. Running TRIM regularly will improves the performance and increases the SSDs lifespan. Since it is based on the utillinux no additional package is required.
		
			
				
	
	
		
			10 lines
		
	
	
		
			136 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			136 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ lib, ... }:
 | 
						|
 | 
						|
{
 | 
						|
  boot.kernel.sysctl = {
 | 
						|
    "vm.swappiness" = lib.mkDefault 1;
 | 
						|
  };
 | 
						|
 | 
						|
  services.fstrim.enable = lib.mkDefault true;
 | 
						|
}
 |