mirror of
https://github.com/Ascyii/nixos.git
synced 2026-01-01 06:44:26 -05:00
Some lsp refactor. Made webdav finally work with some internet search
This commit is contained in:
@@ -1,67 +1,65 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
let inherit (lib) mkOption types;
|
||||
in {
|
||||
|
||||
options.batMode = mkOption {
|
||||
type = types.enum [ "single" "double" ];
|
||||
default = "single";
|
||||
};
|
||||
options.batMode = mkOption {
|
||||
type = types.enum [ "single" "double" ];
|
||||
default = "single";
|
||||
};
|
||||
|
||||
config = {
|
||||
powerManagement.powertop.enable = true;
|
||||
services.upower = {
|
||||
enable = true;
|
||||
config = {
|
||||
powerManagement.powertop.enable = true;
|
||||
services.upower = {
|
||||
enable = true;
|
||||
|
||||
# In accordance with the waybar battery colors
|
||||
percentageLow = 30;
|
||||
percentageCritical = 20;
|
||||
percentageAction = 10;
|
||||
# In accordance with the waybar battery colors
|
||||
percentageLow = 30;
|
||||
percentageCritical = 20;
|
||||
percentageAction = 10;
|
||||
|
||||
criticalPowerAction = "PowerOff"; # This can destroy work
|
||||
usePercentageForPolicy = true;
|
||||
};
|
||||
criticalPowerAction = "PowerOff"; # This can destroy work
|
||||
usePercentageForPolicy = true;
|
||||
};
|
||||
|
||||
services.tlp = if config.batMode == "single" then {
|
||||
enable = true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = 65;
|
||||
STOP_CHARGE_THRESH_BAT0 = 85;
|
||||
services.tlp = if config.batMode == "single" then {
|
||||
enable = true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = 65;
|
||||
STOP_CHARGE_THRESH_BAT0 = 85;
|
||||
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 65;
|
||||
};
|
||||
} else {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 65;
|
||||
};
|
||||
} else {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 75;
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 75;
|
||||
|
||||
# 0 is first
|
||||
START_CHARGE_THRESH_BAT0 = 60;
|
||||
STOP_CHARGE_THRESH_BAT0 = 85;
|
||||
# 0 is first
|
||||
START_CHARGE_THRESH_BAT0 = 60;
|
||||
STOP_CHARGE_THRESH_BAT0 = 85;
|
||||
|
||||
# 1 is second
|
||||
START_CHARGE_THRESH_BAT1 = 60;
|
||||
STOP_CHARGE_THRESH_BAT1 = 85;
|
||||
};
|
||||
};
|
||||
# 1 is second
|
||||
START_CHARGE_THRESH_BAT1 = 60;
|
||||
STOP_CHARGE_THRESH_BAT1 = 85;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user