grimm-nixos-laptop/common/tooling/default.nix

127 lines
2.4 KiB
Nix
Raw Normal View History

2024-05-07 23:31:41 +02:00
{
pkgs,
config,
lib,
...
}:
2024-04-10 16:51:28 +02:00
let
2024-05-11 22:55:59 +02:00
inherit (config.grimmShared) enable tooling graphical;
inherit (lib)
mkEnableOption
getExe
optionals
mkIf
;
2024-04-10 16:51:28 +02:00
in
{
2024-04-26 21:36:24 +02:00
imports = [
2024-05-30 22:12:15 +02:00
# ./lilypond.nix
2024-04-27 10:51:53 +02:00
./nix.nix
./security.nix
./python.nix
./rust.nix
./lsp.nix
2024-05-30 22:12:15 +02:00
./helix.nix
2024-05-17 12:18:20 +02:00
./git.nix
2024-05-18 16:41:17 +02:00
./c.nix
./java.nix
2024-05-31 17:33:40 +02:00
./ranger.nix
2024-04-26 21:36:24 +02:00
];
2024-05-11 22:55:59 +02:00
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
2024-05-16 11:59:05 +02:00
rfindup
2024-05-11 22:55:59 +02:00
pstree
file
wget
2024-05-17 12:18:20 +02:00
bat
2024-05-11 22:55:59 +02:00
hyfetch
btop
eza
2024-05-29 09:54:13 +02:00
starship
2024-05-11 22:55:59 +02:00
unzip
p7zip
fbcat
gomuks
imagemagick
nmap
parted
expect
]
++ optionals graphical [
wev
qdirstat
libva-utils
gparted
2024-08-15 14:59:23 +02:00
bottles
2024-05-11 22:55:59 +02:00
];
environment.shellAliases = {
":q" = "exit";
"ls" = "eza";
"lix" = "nix";
2024-05-31 17:33:40 +02:00
"l" = "eza -hla";
"vi" = "hx";
2024-05-17 12:18:20 +02:00
"bat" = "bat --theme=Dracula";
2024-05-11 22:55:59 +02:00
};
2024-04-30 12:08:28 +02:00
2024-05-11 22:55:59 +02:00
programs.tmux = {
enable = true;
historyLimit = 42000;
#keyMode = "vi";
};
2024-04-10 16:51:28 +02:00
2024-06-13 22:56:30 +02:00
programs.fzf.fuzzyCompletion = true;
2024-05-17 12:18:20 +02:00
environment.sessionVariables = {
MANPAGER = "sh -c 'col -bx | ${getExe pkgs.bat} -l man -p'";
MANROFFOPT = "-c";
};
2024-05-11 22:55:59 +02:00
# virtualisation.docker.enable = true;
2024-05-07 23:31:41 +02:00
2024-05-11 22:55:59 +02:00
services.dbus.implementation = "broker";
2024-05-07 23:31:41 +02:00
2024-05-11 22:55:59 +02:00
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
2024-06-13 22:56:30 +02:00
#programs.ssh = {
# # startAgent = true;
# enableAskPassword = graphical;
# askPassword = mkIf graphical (getExe pkgs.lxqt.lxqt-openssh-askpass);
#};
2024-05-11 22:55:59 +02:00
programs.thefuck.enable = true;
2024-05-25 23:14:08 +02:00
2024-05-30 22:12:15 +02:00
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)";
2024-05-31 17:33:40 +02:00
# ignore_timeout = true;
2024-05-30 22:12:15 +02:00
};
# env_var.SHELL = {variable = "SHELL"; default = ""; };
};
};
2024-05-11 22:55:59 +02:00
};
2024-05-11 22:55:59 +02:00
options.grimmShared.tooling = {
enable = mkEnableOption "grimm-tooling";
};
2024-03-24 16:59:47 +01:00
}