move reflac and disk-smart-test to overlays.nix
This commit is contained in:
parent
01a6ebcba6
commit
125c8a685e
@ -174,44 +174,8 @@
|
|||||||
|
|
||||||
lsof
|
lsof
|
||||||
|
|
||||||
(pkgs.writeShellApplication {
|
disk-smart-test
|
||||||
name = "disk-smart-test";
|
reflac
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
gnugrep
|
|
||||||
coreutils
|
|
||||||
smartmontools
|
|
||||||
];
|
|
||||||
|
|
||||||
text = ''
|
|
||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
|
||||||
echo "This command requires root."
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i in /dev/disk/by-id/*; do
|
|
||||||
case "$i" in
|
|
||||||
*\\-part[0-9]*) continue ;;
|
|
||||||
esac
|
|
||||||
echo -n "$i "
|
|
||||||
smartctl -a "$i" | grep "SMART overall-health self-assessment test result:" | cut -d' ' -f6
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
|
|
||||||
(pkgs.writeShellApplication {
|
|
||||||
name = "reflac";
|
|
||||||
runtimeInputs = with pkgs; [ flac ];
|
|
||||||
excludeShellChecks = [ "2086" ];
|
|
||||||
|
|
||||||
text = builtins.readFile (
|
|
||||||
pkgs.fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/chungy/reflac/refs/heads/master/reflac";
|
|
||||||
sha256 = "61c6cc8be3d276c6714e68b55e5de0e6491f50bbf195233073dbce14a1e278a7";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
pfetch-rs
|
pfetch-rs
|
||||||
|
|
||||||
|
|||||||
39
overlays.nix
39
overlays.nix
@ -30,4 +30,43 @@ final: prev: {
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
disk-smart-test = prev.writeShellApplication {
|
||||||
|
name = "disk-smart-test";
|
||||||
|
runtimeInputs = with prev; [
|
||||||
|
gnugrep
|
||||||
|
coreutils
|
||||||
|
smartmontools
|
||||||
|
];
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
echo "This command requires root."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i in /dev/disk/by-id/*; do
|
||||||
|
case "$i" in
|
||||||
|
*\\-part[0-9]*) continue ;;
|
||||||
|
esac
|
||||||
|
echo -n "$i "
|
||||||
|
smartctl -a "$i" | grep "SMART overall-health self-assessment test result:" | cut -d' ' -f6
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
reflac = prev.writeShellApplication {
|
||||||
|
name = "reflac";
|
||||||
|
runtimeInputs = with prev; [ flac ];
|
||||||
|
excludeShellChecks = [ "2086" ];
|
||||||
|
|
||||||
|
text = builtins.readFile (
|
||||||
|
prev.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/chungy/reflac/refs/heads/master/reflac";
|
||||||
|
sha256 = "61c6cc8be3d276c6714e68b55e5de0e6491f50bbf195233073dbce14a1e278a7";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user