switch audio with rofi and add extraLib

This commit is contained in:
Noah Masur
2023-03-22 21:15:41 -04:00
parent 9b97c9ac84
commit f69d233c39
7 changed files with 50 additions and 16 deletions

16
overlays/lib.nix Normal file
View File

@ -0,0 +1,16 @@
_final: prev: {
extraLib = prev.lib // {
# Quickly package shell scripts with their dependencies
# From https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6
mkScript = { name, file, env ? [ ] }:
prev.pkgs.writeScriptBin name ''
for i in ${prev.lib.concatStringsSep " " env}; do
export PATH="$i/bin:$PATH"
done
exec ${prev.pkgs.bash}/bin/bash ${file} $@
'';
};
}