mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
remove extraLib, replace mkScript with writeShellApplication
This commit is contained in:
parent
1cf5f46adf
commit
53a8cc83ea
@ -121,7 +121,6 @@
|
|||||||
inputs.nur.overlay
|
inputs.nur.overlay
|
||||||
inputs.nix2vim.overlay
|
inputs.nix2vim.overlay
|
||||||
(import ./overlays/neovim-plugins.nix inputs)
|
(import ./overlays/neovim-plugins.nix inputs)
|
||||||
(import ./overlays/lib.nix)
|
|
||||||
(import ./overlays/calibre-web.nix)
|
(import ./overlays/calibre-web.nix)
|
||||||
(import ./overlays/disko.nix inputs)
|
(import ./overlays/disko.nix inputs)
|
||||||
];
|
];
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
consul
|
consul
|
||||||
noti # Create notifications programmatically
|
noti # Create notifications programmatically
|
||||||
ipcalc # Make IP network calculations
|
ipcalc # Make IP network calculations
|
||||||
(pkgs.extraLib.mkScript {
|
(writeShellApplication {
|
||||||
name = "ocr";
|
name = "ocr";
|
||||||
file = ../../modules/common/shell/bash/scripts/ocr.sh;
|
runtimeInputs = [ tesseract ];
|
||||||
env = [ tesseract ];
|
text = builtins.readFile ../../modules/common/shell/bash/scripts/ocr.sh;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -167,10 +167,10 @@ in {
|
|||||||
altTabCommand = "${rofi}/bin/rofi -show window -modi window";
|
altTabCommand = "${rofi}/bin/rofi -show window -modi window";
|
||||||
calculatorCommand = "${rofi}/bin/rofi -modes calc -show calc";
|
calculatorCommand = "${rofi}/bin/rofi -modes calc -show calc";
|
||||||
audioSwitchCommand = "${
|
audioSwitchCommand = "${
|
||||||
(pkgs.extraLib.mkScript {
|
(pkgs.writeShellApplication {
|
||||||
name = "switch-audio";
|
name = "switch-audio";
|
||||||
file = ./rofi/pulse-sink.sh;
|
runtimeInputs = [ pkgs.ponymix rofi ];
|
||||||
env = [ pkgs.ponymix rofi ];
|
text = builtins.readFile ./rofi/pulse-sink.sh;
|
||||||
})
|
})
|
||||||
}/bin/switch-audio";
|
}/bin/switch-audio";
|
||||||
};
|
};
|
||||||
|
@ -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} $@
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user