feat: add sensors

This commit is contained in:
2025-08-22 21:31:41 -07:00
parent 421dacc3cf
commit 22a5fc2dfe
5 changed files with 119 additions and 74 deletions

View File

@@ -17,5 +17,6 @@
./zed-editor.nix
./virtualization.nix
./printing.nix
./sensors.nix
];
}

View File

@@ -48,6 +48,8 @@
awscli2
gitui
htop
lm_sensors
fanctl
];
programs.hyprland = {
enable = true;

27
nix/modules/sensors.nix Normal file
View File

@@ -0,0 +1,27 @@
{
pkgs,
lib,
config,
...
}:
{
options.sensors = {
enable = lib.mkEnableOption "enable sensors";
};
config = lib.mkIf config.sensors.enable {
boot.kernelModules = [
"coretemp"
"nct6775"
];
systemd.services."sensors-init" = {
description = "Initialize sensor settings";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "/run/current-system/sw/bin/sensors -s";
};
};
};
}