home/scripts: cleanup

This commit is contained in:
Guanran Wang 2024-02-06 17:20:38 +08:00
parent 0d8cbe1f93
commit de6da2748c
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -15,17 +15,17 @@ with pkgs; let
inherit name; inherit name;
executable = true; executable = true;
destination = "/bin/${name}"; destination = "/bin/${name}";
text = lib.concatStringsSep "\n" [ text = ''
"#!${runtimeShell}" #!${runtimeShell}
(lib.optionalString (runtimeInputs != []) ''export PATH="${lib.makeBinPath runtimeInputs}:$PATH"'') ${lib.optionalString (runtimeInputs != []) ''export PATH="${lib.makeBinPath runtimeInputs}:$PATH"''}
(builtins.readFile file) ${builtins.readFile file}
]; '';
}; };
in { in {
home.packages = [ home.packages = [
(makeScript { (makeScript {
name = "lofi"; name = "lofi";
runtimeInputs = [mpv]; runtimeInputs = [coreutils mpv];
file = pkgs.fetchurl { file = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/lime-desu/bin/69422c37582c5914863997c75c268791a0de136e/lofi"; url = "https://raw.githubusercontent.com/lime-desu/bin/69422c37582c5914863997c75c268791a0de136e/lofi";
hash = "sha256-hT+S/rqOHUYnnFcSDFfQht4l1DGasz1L3wDHKUWLraA="; hash = "sha256-hT+S/rqOHUYnnFcSDFfQht4l1DGasz1L3wDHKUWLraA=";