feat(aragon): add thermal monitoring with thermald, mcelog and lm_sensors

This commit is contained in:
Your Name
2026-04-12 11:59:43 +02:00
parent b200beb7ac
commit 9e0da9a1d2
4 changed files with 48 additions and 8 deletions

View File

@@ -19,6 +19,7 @@
../../modules/pam.nix
../../modules/polkit.nix
../../modules/zram.nix
../../modules/thermal.nix
# Networking and remote access
../../modules/openssh.nix

View File

@@ -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

View File

@@ -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
View 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;
};
};
}