{ pkgs, config, lib, ... }: let inherit (config.grimmShared) enable tooling graphical; inherit (lib) mkEnableOption getExe optionals mkIf ; in { imports = [ # ./lilypond.nix ./nix.nix ./security.nix ./python.nix ./rust.nix ./lsp.nix ./helix.nix ./git.nix ./wine.nix ./c.nix ./java.nix ./opensnitch ./ranger.nix ./apparmor ]; 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 starship unzip p7zip fbcat gomuks imagemagick nmap parted expect gptfdisk ] ++ optionals graphical [ wev qdirstat libva-utils gparted bottles ]; environment.shellAliases = { ":q" = "exit"; "ls" = "eza"; "lix" = "nix"; "l" = "eza -hla"; "vi" = "hx"; "bat" = "bat --theme=Dracula"; }; programs.tmux = { enable = true; historyLimit = 42000; #keyMode = "vi"; }; programs.fzf.fuzzyCompletion = true; 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 = false; #programs.ssh = { # # startAgent = true; # enableAskPassword = graphical; # askPassword = mkIf graphical (getExe pkgs.lxqt.lxqt-openssh-askpass); #}; programs.thefuck.enable = true; programs.starship = { enable = true; settings = { format = "$all$directory$character"; nodejs.disabled = true; cmake.symbol = "cmake "; custom.shell = { command = "basename $SHELL"; when = "test -v SHELL"; format = " in [$output]($style)"; # ignore_timeout = true; }; # env_var.SHELL = {variable = "SHELL"; default = ""; }; }; }; }; options.grimmShared.tooling = { enable = mkEnableOption "grimm-tooling"; }; }