4
hosts/common/system/configs/cpu/default.nix
Normal file
4
hosts/common/system/configs/cpu/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
}
|
17
hosts/common/system/configs/cpu/options.nix
Normal file
17
hosts/common/system/configs/cpu/options.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.hardware.cpu =
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
cores = mkOption {
|
||||
type = ints.positive;
|
||||
description = "The number of cpu cores.";
|
||||
};
|
||||
|
||||
threads = mkOption {
|
||||
type = ints.positive;
|
||||
description = "The number of cpu threads.";
|
||||
};
|
||||
};
|
||||
}
|
@@ -26,6 +26,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
# uuidgen -r | tr -d -
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/administration/systemd-state.section.md
|
||||
# https://github.com/NixOS/nixpkgs/pull/286140/files
|
||||
# https://git.eisfunke.com/config/nixos/-/blob/e65e1dc21d06d07b454005762b177ef151f8bfb6/nixos/machine-id.nix
|
||||
|
12
hosts/common/system/configs/tlp/default.nix
Normal file
12
hosts/common/system/configs/tlp/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user