nixos-config/scripts/default.nix

47 lines
1.4 KiB
Nix
Raw Normal View History

2022-10-18 21:45:20 -03:00
(final: prev:
2023-01-22 18:12:04 -03:00
with prev;
let
import_script = (_: path: import (path) { inherit pkgs lib; });
create_script = (name: text: runtimeInputs:
let
script_body = pkgs.writeTextFile {
inherit name;
executable = true;
text = ''
${builtins.readFile text}
'';
};
in
(pkgs.writeShellApplication {
inherit name runtimeInputs;
text = ''exec ${script_body} "$@"'';
checkPhase = "";
}));
create_scripts =
lib.mapAttrs (name: deps: create_script name ./${name} deps);
in
create_scripts
{
2022-10-18 19:53:40 -03:00
br = [ ];
bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ];
2023-02-07 13:39:04 -03:00
down_meme = [ wl-clipboard yt-dlp libnotify ];
2023-01-27 17:09:48 -03:00
wl-copy-file = [ wl-clipboard fish ];
2022-10-18 20:04:46 -03:00
_diffr = [ diffr ];
2022-12-22 11:12:06 -03:00
_thunar-terminal = [ final.terminal ];
2022-10-18 21:45:20 -03:00
kak-pager = [ fish final._diffr ];
2022-11-07 23:57:34 -03:00
kak-man-pager = [ final.kak-pager ];
2023-01-28 15:31:51 -03:00
musmenu = [ mpc-cli final.wdmenu trash-cli libnotify sd wl-clipboard ];
2022-12-01 23:13:00 -03:00
showkeys =
[ ]; # This will not work unless programs.wshowkeys is enabled systemwide
2022-10-18 20:04:46 -03:00
terminal = [ alacritty ];
2022-10-21 20:21:51 -03:00
wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
2022-10-18 20:04:46 -03:00
screenshotsh =
2022-10-18 21:45:20 -03:00
[ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
2022-11-07 11:24:40 -03:00
volumesh = [ pulseaudio libnotify ];
pulse_sink = [ pulseaudio pamixer final.wdmenu ];
2022-10-18 12:37:14 -03:00
} // lib.mapAttrs import_script {
2023-01-22 18:12:04 -03:00
wdmenu = ./wdmenu.nix;
wlauncher = ./wlauncher.nix;
_gpg-unlock = ./_gpg-unlock.nix;
})