Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions common/pc/laptop/default.nix
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Looking at the NixOS tuneD module, auto-cpufreq also conflicts with the service. Should we add a check for it as well?

I am using /common/pc/laptop/default.nix and enable services.auto-cpufreq.enable, resulting in service.tlp.enable being implicitly enabled.

Although both services may conflict, they can apparently be used together. Personally, I just keep both enabled without bothering with fancy configurations on my end, hoping auto-cpufreq works reasonably well alongside tlp. Either way, my system never crashed due to this, if that is of interest.

Consequently, I do not know whether a warning or assertion would be appropriate.

Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ config, lib, ... }:
{
config,
lib,
options,
...
}:

{
imports = [ ../. ];
Expand All @@ -7,7 +12,7 @@
# However, these 2 services clash when enabled simultaneously.
# https://github.com/NixOS/nixos-hardware/issues/260
services.tlp.enable = lib.mkDefault (
(lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|| !config.services.power-profiles-daemon.enable
!(options.services ? power-profiles-daemon && config.services.power-profiles-daemon.enable)
&& !(options.services ? tuned && config.services.tuned.enable)
);
}
11 changes: 8 additions & 3 deletions gpd/win-2/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ config, lib, ... }:
{
config,
lib,
options,
...
}:
{
imports = [
../../common/cpu/intel
Expand All @@ -11,8 +16,8 @@
];

services.tlp.enable = lib.mkDefault (
(lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|| !config.services.power-profiles-daemon.enable
!(options.services ? power-profiles-daemon && config.services.power-profiles-daemon.enable)
&& !(options.services ? tuned && config.services.tuned.enable)
);

# Required for grub to properly display the boot menu.
Expand Down