mirror of
				https://github.com/Stunkymonkey/nixos.git
				synced 2025-10-31 01:32:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			486 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			486 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   config,
 | |
|   lib,
 | |
|   pkgs,
 | |
|   ...
 | |
| }:
 | |
| let
 | |
|   cfg = config.my.profiles.powersave;
 | |
| in
 | |
| {
 | |
|   options.my.profiles.powersave = with lib; {
 | |
|     enable = mkEnableOption "powersave profile";
 | |
|   };
 | |
| 
 | |
|   config = lib.mkIf cfg.enable {
 | |
|     environment.systemPackages = with pkgs; [
 | |
|       powertop
 | |
|       s-tui
 | |
|     ];
 | |
| 
 | |
|     powerManagement = {
 | |
|       cpuFreqGovernor = "powersave";
 | |
|       powertop.enable = true;
 | |
|     };
 | |
| 
 | |
|     services = {
 | |
|       thermald.enable = true;
 | |
|       upower.enable = true;
 | |
|     };
 | |
|   };
 | |
| }
 | 
