feat(aragon): add thermal monitoring with thermald, mcelog and lm_sensors
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
../../modules/pam.nix
|
||||
../../modules/polkit.nix
|
||||
../../modules/zram.nix
|
||||
../../modules/thermal.nix
|
||||
|
||||
# Networking and remote access
|
||||
../../modules/openssh.nix
|
||||
|
||||
@@ -53,17 +53,12 @@
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
vulkan-headers
|
||||
];
|
||||
};
|
||||
|
||||
# Enable Vulkan support
|
||||
hardware.opengl.enable = true;
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
vulkan-headers
|
||||
];
|
||||
|
||||
# You *can* still put utilities here
|
||||
environment.systemPackages = with pkgs; [
|
||||
vulkan-tools
|
||||
|
||||
@@ -49,12 +49,16 @@
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
vpl-gpu-rt
|
||||
mkl
|
||||
|
||||
#hardware decode and opencl
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD (for HD Graphics starting Broadwell (2014) and newer)
|
||||
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
libvdpau-va-gl
|
||||
intel-compute-runtime
|
||||
intel-ocl
|
||||
intel-graphics-compiler
|
||||
level-zero
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
|
||||
|
||||
40
modules/thermal.nix
Normal file
40
modules/thermal.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.lm_sensors.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.mcelog.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
lm_sensors
|
||||
mcelog
|
||||
];
|
||||
|
||||
systemd.services.thermal-log = {
|
||||
description = "Periodic thermal logging to journal";
|
||||
serviceConfig.Type = "oneshot";
|
||||
path = with pkgs; [
|
||||
lm_sensors
|
||||
gnugrep
|
||||
coreutils
|
||||
];
|
||||
script = ''
|
||||
TEMP=$(sensors 2>/dev/null | grep -i 'Tctl\|Tdie' | head -1 || echo "N/A")
|
||||
logger -t thermal-log "CPU Temp: $TEMP"
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.timers.thermal-log = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "5min";
|
||||
OnUnitActiveSec = "5min";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user