diff --git a/flake.nix b/flake.nix index df2924c..20ee91c 100644 --- a/flake.nix +++ b/flake.nix @@ -121,7 +121,6 @@ inputs.nur.overlay inputs.nix2vim.overlay (import ./overlays/neovim-plugins.nix inputs) - (import ./overlays/lib.nix) (import ./overlays/calibre-web.nix) (import ./overlays/disko.nix inputs) ]; diff --git a/modules/darwin/utilities.nix b/modules/darwin/utilities.nix index 1021ef6..db43292 100644 --- a/modules/darwin/utilities.nix +++ b/modules/darwin/utilities.nix @@ -19,10 +19,10 @@ consul noti # Create notifications programmatically ipcalc # Make IP network calculations - (pkgs.extraLib.mkScript { + (writeShellApplication { name = "ocr"; - file = ../../modules/common/shell/bash/scripts/ocr.sh; - env = [ tesseract ]; + runtimeInputs = [ tesseract ]; + text = builtins.readFile ../../modules/common/shell/bash/scripts/ocr.sh; }) ]; diff --git a/modules/nixos/graphical/rofi.nix b/modules/nixos/graphical/rofi.nix index 8d695b7..87911c7 100644 --- a/modules/nixos/graphical/rofi.nix +++ b/modules/nixos/graphical/rofi.nix @@ -167,10 +167,10 @@ in { altTabCommand = "${rofi}/bin/rofi -show window -modi window"; calculatorCommand = "${rofi}/bin/rofi -modes calc -show calc"; audioSwitchCommand = "${ - (pkgs.extraLib.mkScript { + (pkgs.writeShellApplication { name = "switch-audio"; - file = ./rofi/pulse-sink.sh; - env = [ pkgs.ponymix rofi ]; + runtimeInputs = [ pkgs.ponymix rofi ]; + text = builtins.readFile ./rofi/pulse-sink.sh; }) }/bin/switch-audio"; }; diff --git a/overlays/lib.nix b/overlays/lib.nix deleted file mode 100644 index 9e60c89..0000000 --- a/overlays/lib.nix +++ /dev/null @@ -1,16 +0,0 @@ -_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} $@ - ''; - }; - -}