mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 17:27:14 +08:00 
			
		
		
		
	assus/battery: rename option to match nixpkgs convention
This commit is contained in:
		@@ -13,14 +13,14 @@ in
 | 
				
			|||||||
      default = 100;
 | 
					      default = 100;
 | 
				
			||||||
      type = lib.types.int;
 | 
					      type = lib.types.int;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    addChargeUptoScript = lib.mkOption {
 | 
					    enableChargeUptoScript = lib.mkOption {
 | 
				
			||||||
      description = "Whether to add charge-upto to environment.systemPackages. `charge-upto 75` temporarily sets the charge limit to 75%.";
 | 
					      description = "Whether to add charge-upto to environment.systemPackages. `charge-upto 75` temporarily sets the charge limit to 75%.";
 | 
				
			||||||
      default = true;
 | 
					      default = true;
 | 
				
			||||||
      type = lib.types.bool;
 | 
					      type = lib.types.bool;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  config = {
 | 
					  config = {
 | 
				
			||||||
    environment.systemPackages = lib.mkIf cfg.addChargeUptoScript [ p ];
 | 
					    environment.systemPackages = lib.mkIf cfg.enableChargeUptoScript [ p ];
 | 
				
			||||||
    systemd.services.battery-charge-threshold = {
 | 
					    systemd.services.battery-charge-threshold = {
 | 
				
			||||||
      wantedBy = [ "local-fs.target" "suspend.target" ];
 | 
					      wantedBy = [ "local-fs.target" "suspend.target" ];
 | 
				
			||||||
      after = [ "local-fs.target" "suspend.target" ];
 | 
					      after = [ "local-fs.target" "suspend.target" ];
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user