{ pkgs, config, lib, ... }: let inherit (config.grimmShared) enable tooling graphical; inherit (lib) mkEnableOption mkOption types getExe optionals mkIf ; in { imports = [ ./lilypond.nix ./nix.nix ./security.nix ./python.nix ./rust.nix ./nvim.nix ./lsp.nix ./git.nix ./c.nix ./java.nix ]; config = mkIf (enable && tooling.enable) { environment.systemPackages = with pkgs; [ (writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@") (writeShellScriptBin "tree" "${getExe eza} -T --git -lh --no-permissions --no-user --no-filesize --no-time") (writeShellScriptBin "spawn" ''exec "$@" &> /dev/null &'') urlencode rfindup pstree file wget bat hyfetch btop eza unzip p7zip fbcat gomuks ranger imagemagick nmap parted expect ] ++ optionals graphical [ wev qdirstat libva-utils gparted ]; environment.shellAliases = { ":q" = "exit"; "ls" = "eza"; "lix" = "nix"; "bat" = "bat --theme=Dracula"; }; programs.tmux = { enable = true; historyLimit = 42000; #keyMode = "vi"; }; environment.sessionVariables = { MANPAGER = "sh -c 'col -bx | ${getExe pkgs.bat} -l man -p'"; MANROFFOPT = "-c"; }; # virtualisation.docker.enable = true; services.dbus.implementation = "broker"; boot.tmp.cleanOnBoot = true; zramSwap.enable = true; programs.ssh = { startAgent = true; enableAskPassword = graphical; askPassword = mkIf graphical (getExe pkgs.lxqt.lxqt-openssh-askpass); }; programs.thefuck.enable = true; }; options.grimmShared.tooling = { enable = mkEnableOption "grimm-tooling"; supportedLangs = mkOption { type = types.listOf (types.enum [ ]); default = [ ]; description = "Languages for which to enable support"; }; }; }