mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Power] attempt to make Intel RAPL energy monitoring readable by users in power group
This commit is contained in:
parent
b25678084a
commit
a4cbc0f621
1 changed files with 4 additions and 0 deletions
|
|
@ -116,7 +116,11 @@ in {
|
|||
|
||||
ACTION!="remove", KERNEL=="BAT*", SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", RUN+="${pkgs.systemd}/bin/systemctl start battery-power.target"
|
||||
ACTION!="remove", KERNEL=="BAT*", SUBSYSTEM=="power_supply", ATTR{status}=="Charging", RUN+="${pkgs.systemd}/bin/systemctl stop battery-power.target"
|
||||
|
||||
ACTION!="remove", DEVPATH=="*intel-rapl:*", SUBSYSTEM=="powercap", RUN+="${pkgs.coreutils}/bin/chmod g+r '/sys%p/ernegy_uj'"
|
||||
'';
|
||||
|
||||
users.groups.power = {};
|
||||
|
||||
systemd.services.undervolt-intel = {
|
||||
script = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue