{ 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 ./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 qrencode man-pages man-pages-posix ] ++ optionals graphical [ wev qdirstat libva-utils gparted bottles ]; environment.sessionVariables = { MANPAGER = "sh -c 'col -bx | ${getExe pkgs.bat} -l man -p'"; MANROFFOPT = "-c"; }; documentation.dev.enable = true; # virtualisation.docker.enable = true; services.dbus.implementation = "broker"; boot.tmp.cleanOnBoot = true; zramSwap.enable = false; }; options.grimmShared.tooling = { enable = mkEnableOption "grimm-tooling"; }; }