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

View File

@ -1,19 +1,6 @@
{ config, pkgs, lib, ... }:
let
# 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 ? [ ] }:
pkgs.writeScriptBin name ''
for i in ${lib.concatStringsSep " " env}; do
export PATH="$i/bin:$PATH"
done
exec ${pkgs.bash}/bin/bash ${file} $@
'';
in {
{
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
@ -32,7 +19,7 @@ in {
consul
noti # Create notifications programmatically
ipcalc # Make IP network calculations
(mkScript {
(pkgs.extraLib.mkScript {
name = "ocr";
file = ../../modules/common/shell/bash/scripts/ocr.sh;
env = [ tesseract ];