1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-29 01:47:44 +00:00

Revert "treewide: finish renaming to Watt"

This reverts commit 5a197951d9.
This commit is contained in:
RGBCube 2025-06-07 00:41:46 +03:00
parent d33659209e
commit b328c948e0
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
14 changed files with 132 additions and 132 deletions

View file

@ -10,32 +10,32 @@ inputs: {
inherit (lib.lists) optional;
inherit (lib.meta) getExe;
cfg = config.services.watt;
cfg = config.services.superfreq;
format = pkgs.formats.toml {};
cfgFile = format.generate "watt-config.toml" cfg.settings;
cfgFile = format.generate "superfreq-config.toml" cfg.settings;
in {
options.services.watt = {
options.services.superfreq = {
enable = mkEnableOption "Automatic CPU speed & power optimizer for Linux";
package = mkPackageOption inputs.self.packages.${pkgs.stdenv.system} "watt" {
package = mkPackageOption inputs.self.packages.${pkgs.stdenv.system} "superfreq" {
pkgsText = "self.packages.\${pkgs.stdenv.system}";
};
settings = mkOption {
default = {};
type = submodule {freeformType = format.type;};
description = "Configuration for Watt.";
description = "Configuration for Superfreq.";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [cfg.package];
# This is necessary for the Watt CLI. The environment variable
# This is necessary for the Superfreq CLI. The environment variable
# passed to the systemd service will take priority in read order.
environment.etc."watt.toml".source = cfgFile;
environment.etc."superfreq.toml".source = cfgFile;
systemd.services.watt = {
systemd.services.superfreq = {
wantedBy = ["multi-user.target"];
conflicts = [
"auto-cpufreq.service"
@ -45,12 +45,12 @@ in {
"thermald.service"
];
serviceConfig = {
Environment = optional (cfg.settings != {}) ["WATT_CONFIG=${cfgFile}"];
Environment = optional (cfg.settings != {}) ["SUPERFREQ_CONFIG=${cfgFile}"];
WorkingDirectory = "";
ExecStart = "${getExe cfg.package} daemon --verbose";
Restart = "on-failure";
RuntimeDirectory = "watt";
RuntimeDirectory = "superfreq";
RuntimeDirectoryMode = "0755";
};
};
@ -60,14 +60,14 @@ in {
assertion = !config.services.power-profiles-daemon.enable;
message = ''
You have set services.power-profiles-daemon.enable = true;
which conflicts with Watt.
which conflicts with Superfreq.
'';
}
{
assertion = !config.services.auto-cpufreq.enable;
message = ''
You have set services.auto-cpufreq.enable = true;
which conflicts with Watt.
which conflicts with Superfreq.
'';
}
];

View file

@ -5,7 +5,7 @@
fs = lib.fileset;
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "watt";
pname = "superfreq";
version = "0.1.0";
src = fs.toSource {
@ -24,14 +24,14 @@ in
meta = {
description = "Automatic CPU speed & power optimizer for Linux";
longDescription = ''
Watt is a CPU speed & power optimizer for Linux. It uses
Superfreq is a CPU speed & power optimizer for Linux. It uses
the CPU frequency scaling driver to set the CPU frequency
governor and the CPU power management driver to set the CPU
power management mode.
'';
homepage = "https://github.com/NotAShelf/watt";
mainProgram = "watt";
homepage = "https://github.com/NotAShelf/superfreq";
mainProgram = "superfreq";
license = lib.licenses.mpl20;
platforms = lib.platforms.linux;
};