grimm-nixos-laptop/common/tooling/default.nix
2025-01-26 21:43:23 +01:00

98 lines
1.8 KiB
Nix

{
pkgs,
config,
lib,
...
}:
let
inherit (config.grimmShared) enable tooling graphical;
inherit (lib)
mkEnableOption
getExe
optionals
mkIf
;
in
{
imports = [
# ./lilypond.nix
./nix.nix
./python.nix
./rust.nix
./lsp.nix
./git.nix
# ./wine.nix
./c.nix
./java.nix
./ranger.nix
./nix-index.nix
# ./defaultProtectHome.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
wget
bat
fastfetch
eza
starship
fd
ripgrep
file
pstree
rfindup
btop
unzip
fbcat
expect
gptfdisk
qrencode
man-pages
man-pages-posix
undollar
openssl
]
++ optionals graphical [
wev
k4dirstat
libva-utils
gparted
bottles
wlvncc
];
environment.sessionVariables = {
MANPAGER = "sh -c 'col -bx | ${getExe pkgs.bat} -l man -p'";
MANROFFOPT = "-c";
SYSTEMD_PAGER = getExe pkgs.bat;
SYSTEMD_PAGERSECURE = "true";
};
programs.command-not-found.enable = true;
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";
};
}