hosts | add auto-cpufreq, switch loki & smaug to use, formating
This commit is contained in:
parent
b7ca0e0020
commit
43fe882270
5 changed files with 54 additions and 7 deletions
|
|
@ -1,4 +1,11 @@
|
||||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.dell-xps-13-9310
|
inputs.nixos-hardware.nixosModules.dell-xps-13-9310
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
@ -18,7 +25,8 @@
|
||||||
kvm.enable = false;
|
kvm.enable = false;
|
||||||
games.enable = true;
|
games.enable = true;
|
||||||
wine.enable = false;
|
wine.enable = false;
|
||||||
tlp.enable = true;
|
tlp.enable = false;
|
||||||
|
auto-cpufreq.enable = true;
|
||||||
gnome-calendar.enable = true;
|
gnome-calendar.enable = true;
|
||||||
};
|
};
|
||||||
wm = {
|
wm = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x260
|
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x260
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||||
|
|
@ -19,7 +26,8 @@
|
||||||
kvm.enable = true;
|
kvm.enable = true;
|
||||||
games.enable = true;
|
games.enable = true;
|
||||||
wine.enable = false;
|
wine.enable = false;
|
||||||
tlp.enable = true;
|
tlp.enable = false;
|
||||||
|
auto-cpufreq = true;
|
||||||
gnome-calendar.enable = true;
|
gnome-calendar.enable = true;
|
||||||
};
|
};
|
||||||
wm = {
|
wm = {
|
||||||
|
|
|
||||||
30
hosts/workstation/auto-cpufreq.nix
Normal file
30
hosts/workstation/auto-cpufreq.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.roles.auto-cpufreq;
|
||||||
|
in {
|
||||||
|
options.roles.auto-cpufreq = {enable = mkEnableOption "roles auto-cpufreq";};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.auto-cpufreq = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
battery = {
|
||||||
|
governor = "powersave";
|
||||||
|
turbo = "never";
|
||||||
|
enable_thresholds = true;
|
||||||
|
start_threshold = 50;
|
||||||
|
stop_threshold = 80;
|
||||||
|
};
|
||||||
|
charger = {
|
||||||
|
governor = "performance";
|
||||||
|
turbo = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -48,6 +48,7 @@ in {
|
||||||
./detect-reboot-needed.nix
|
./detect-reboot-needed.nix
|
||||||
./kmscon.nix
|
./kmscon.nix
|
||||||
./systemd.nix
|
./systemd.nix
|
||||||
|
./auto-cpufreq.nix
|
||||||
./tlp.nix
|
./tlp.nix
|
||||||
./upgrade-diff.nix
|
./upgrade-diff.nix
|
||||||
./wine.nix
|
./wine.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue