nix-conf/user/bin/default.nix
2025-01-01 10:17:26 -05:00

28 lines
568 B
Nix

{
config,
pkgs,
lib,
...
}: let
ln = config.u.lib.ln "${config.u.confPath}/user/bin";
in {
u.bin = with pkgs; {
edit = [];
sh-tmux = [tmux];
sm = [];
} // lib.optionalAttrs config.u.has.graphical {
bell = [pipewire libnotify];
nsxiv-rifle = [nsxiv];
screenshot = [maim xclip];
};
home.file = builtins.listToAttrs (
map
(x: {
name = ".local/bin/${x}";
value = {source = ln x;};
})
(builtins.attrNames config.u.bin)
);
home.packages = pkgs.lib.lists.flatten (builtins.attrValues config.u.bin);
}