Zed + SmartD notifications
This commit is contained in:
parent
f14a742138
commit
5c6639f0b6
4 changed files with 63 additions and 15 deletions
|
|
@ -8,17 +8,14 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
powertop
|
||||
];
|
||||
services.udev.extraRules = let
|
||||
mkRule = as: lib.concatStringsSep ", " as;
|
||||
mkRules = rs: lib.concatStringsSep "\n" rs;
|
||||
in
|
||||
mkRules [
|
||||
(mkRule [
|
||||
''ACTION=="add|change"''
|
||||
''SUBSYSTEM=="block"''
|
||||
''KERNEL=="sd[a-z]"''
|
||||
''ATTR{queue/rotational}=="1"''
|
||||
''RUN+="${pkgs.hdparm}/bin/hdparm -B 90 -S ${builtins.toString (30 * 60 / 5)} /dev/%k"''
|
||||
])
|
||||
];
|
||||
systemd.services.hd-idle = {
|
||||
enable = false;
|
||||
description = "External HD spin down daemon";
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
ExecStart = "${pkgs.hd-idle}/bin/hd-idle -i 1800 -l /var/log/hd-idle.log";
|
||||
ExecReload = "pkill hd-idle";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue