nixos-config/scripts/default.nix

37 lines
1.1 KiB
Nix
Raw Normal View History

2022-08-07 23:58:05 -03:00
{ config, lib, ... }:
2022-08-19 20:40:39 -03:00
(pkgs: _:
2022-10-18 12:37:14 -03:00
with pkgs;
let
import_script = (_: path: import (path) { inherit config pkgs lib; });
2022-10-18 19:53:40 -03:00
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 = "";
2022-10-18 20:04:46 -03:00
}));
2022-10-18 19:53:40 -03:00
create_scripts =
lib.mapAttrs (name: deps: create_script name ./${name} deps);
in create_scripts {
br = [ ];
bmenu = [ bemenu dhist fish j4-dmenu-desktop jq sway ];
2022-10-18 20:04:46 -03:00
_diffr = [ diffr ];
kak-pager = [ fish _diffr ];
terminal = [ alacritty ];
wpass = [ bmenu fd pass sd wl-clipboard wtype ];
screenshotsh =
[ capitaine-cursors grim jq sway wl-clipboard xdg-user-dirs ];
2022-10-18 20:29:24 -03:00
volumesh = [ pulseaudio libnotify ];
2022-10-18 12:37:14 -03:00
} // lib.mapAttrs import_script {
2022-08-19 20:40:39 -03:00
wdmenu = ./wdmenu.nix;
wlauncher = ./wlauncher.nix;
_gpg-unlock = ./_gpg-unlock.nix;
})