reduced power draw + update
This commit is contained in:
@@ -125,6 +125,21 @@
|
||||
#!/bin/sh
|
||||
tmux -S /run/minecraft/${service_configs.minecraft.server_name}.sock attach
|
||||
'')
|
||||
|
||||
(pkgs.writeScriptBin "disk-smart-test" ''
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This command requires root."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
DISKS=$(${pkgs.coreutils}/bin/ls /dev/sd* | ${pkgs.gnugrep}/bin/grep -v "[0-9]$")
|
||||
for i in $DISKS; do
|
||||
${pkgs.coreutils}/bin/echo -n "$i "
|
||||
${pkgs.smartmontools}/bin/smartctl -a "$i" | ${pkgs.gnugrep}/bin/grep "SMART overall-health self-assessment test result:" | ${pkgs.coreutils}/bin/cut -d' ' -f6
|
||||
done
|
||||
'')
|
||||
];
|
||||
|
||||
services.zfs = {
|
||||
@@ -136,6 +151,8 @@
|
||||
let
|
||||
no-rgb = pkgs.writeScriptBin "no-rgb" ''
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | ${pkgs.gnugrep}/bin/grep -E '^[0-9]+: ' | ${pkgs.coreutils}/bin/wc -l)
|
||||
|
||||
for i in $(${pkgs.coreutils}/bin/seq 0 $(($NUM_DEVICES - 1))); do
|
||||
|
||||
Reference in New Issue
Block a user