diff --git a/configuration.nix b/configuration.nix index a7fb730..1a667c4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -174,44 +174,8 @@ lsof - (pkgs.writeShellApplication { - name = "disk-smart-test"; - 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"; - } - ); - }) + disk-smart-test + reflac pfetch-rs diff --git a/overlays.nix b/overlays.nix index dc58d37..38d0f99 100644 --- a/overlays.nix +++ b/overlays.nix @@ -30,4 +30,43 @@ final: prev: { 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"; + } + ); + }; }