refactor os configurations
All checks were successful
Build iso when a new version is pushed / test (push) Successful in 2m10s
All checks were successful
Build iso when a new version is pushed / test (push) Successful in 2m10s
This commit is contained in:
31
osConfigs/modules/powerSave.nix
Normal file
31
osConfigs/modules/powerSave.nix
Normal file
@ -0,0 +1,31 @@
|
||||
# **************************************************************************** #
|
||||
# #
|
||||
# ::: :::::::: #
|
||||
# powerSave.nix :+: :+: :+: #
|
||||
# +:+ +:+ +:+ #
|
||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2025/09/06 00:45:04 by tomoron #+# #+# #
|
||||
# Updated: 2025/09/06 01:02:29 by tomoron ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.mods.powerSave = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "enable services and settings to save power";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.powerSave.enable {
|
||||
services.tlp.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.cpuFreqGovernor = "powersave";
|
||||
services.upower.enable = true;
|
||||
mods.nvidia.prime = true;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user