{ 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); }