Compare commits
No commits in common. "a0e66f6205bbdd509c86649d2c7868e3665341b5" and "51142c3af0ff5679cb7575bce0163e715ef6a401" have entirely different histories.
a0e66f6205
...
51142c3af0
4 changed files with 7 additions and 86 deletions
|
@ -19,10 +19,6 @@
|
||||||
desktop.sway = {
|
desktop.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
kanshi = true;
|
kanshi = true;
|
||||||
waybar = {
|
|
||||||
laptop = true;
|
|
||||||
gpuThermal.enable = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,17 +19,6 @@
|
||||||
desktop.sway = {
|
desktop.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
kanshi = false;
|
kanshi = false;
|
||||||
waybar = {
|
|
||||||
laptop = false;
|
|
||||||
gpuThermal = {
|
|
||||||
enable = true;
|
|
||||||
hmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
|
|
||||||
};
|
|
||||||
cpuThermal = {
|
|
||||||
hwmonPathAbs = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/";
|
|
||||||
inputFilename = "temp3_input";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,43 +12,6 @@ in
|
||||||
default = false;
|
default = false;
|
||||||
description = "configure laptop mode";
|
description = "configure laptop mode";
|
||||||
};
|
};
|
||||||
|
|
||||||
waybar = {
|
|
||||||
laptop = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable laptop element on Waybar";
|
|
||||||
};
|
|
||||||
|
|
||||||
cpuThermal = {
|
|
||||||
|
|
||||||
hwmonPathAbs = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "";
|
|
||||||
description = "CPU thermal hwmon absolute path";
|
|
||||||
};
|
|
||||||
|
|
||||||
inputFilename = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "";
|
|
||||||
description = "CPU thermal hwmon file";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
gpuThermal = {
|
|
||||||
enable = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "enable waybar GPU temperature";
|
|
||||||
};
|
|
||||||
|
|
||||||
hmonPath = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "";
|
|
||||||
description = "Thermal zone for CPU";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
./includes/fuzzel.nix
|
./includes/fuzzel.nix
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
{lib, config, ...}:
|
{config, lib, ...}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
|
||||||
cfg = config.modules.desktop.sway;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
config = mkIf cfg.enable {
|
config = mkIf config.modules.desktop.sway.enable {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd = {
|
systemd = {
|
||||||
|
@ -24,30 +21,12 @@ in
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"network"
|
"network"
|
||||||
"custom/sep"
|
"custom/sep"
|
||||||
] ++ (
|
"backlight"
|
||||||
if cfg.waybar.laptop then [
|
"battery"
|
||||||
"backlight"
|
"custom/sep"
|
||||||
"battery"
|
|
||||||
"custom/sep"
|
|
||||||
]
|
|
||||||
else [
|
|
||||||
]
|
|
||||||
) ++
|
|
||||||
[
|
|
||||||
|
|
||||||
"memory"
|
"memory"
|
||||||
"cpu"
|
"cpu"
|
||||||
"temperature"
|
|
||||||
"custom/sep"
|
"custom/sep"
|
||||||
] ++ (
|
|
||||||
if cfg.waybar.gpuThermal.enable then [
|
|
||||||
"temperature#gpu"
|
|
||||||
"custom/sep"
|
|
||||||
]
|
|
||||||
else [
|
|
||||||
]
|
|
||||||
) ++
|
|
||||||
[
|
|
||||||
"pulseaudio"
|
"pulseaudio"
|
||||||
"custom/sep"
|
"custom/sep"
|
||||||
"clock"
|
"clock"
|
||||||
|
@ -121,13 +100,7 @@ in
|
||||||
"temperature" = {
|
"temperature" = {
|
||||||
"critical-threshold" = 80;
|
"critical-threshold" = 80;
|
||||||
"format" = "{temperatureC}°C ";
|
"format" = "{temperatureC}°C ";
|
||||||
"hwmon-path-abs" = "${cfg.waybar.cpuThermal.hwmonPathAbs}";
|
"thermal-zone" = "6";
|
||||||
"input-filename" = "${cfg.waybar.cpuThermal.inputFilename}";
|
|
||||||
};
|
|
||||||
"temperature#gpu" = {
|
|
||||||
"critical-threshold" = 80;
|
|
||||||
"format" = "GPU: {temperatureC}°C ";
|
|
||||||
"hwmon-path" = "${cfg.waybar.gpuThermal.hmonPath}";
|
|
||||||
};
|
};
|
||||||
"backlight" = {
|
"backlight" = {
|
||||||
"format" = "{percent}% {icon}";
|
"format" = "{percent}% {icon}";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue