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

113 lines
2.1 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
2024-05-18 16:41:17 +02:00
mkOption
types
2024-05-11 22:55:59 +02:00
getExe
optionals
mkIf
;
2024-04-10 16:51:28 +02:00
in
{
2024-04-26 21:36:24 +02:00
imports = [
./lilypond.nix
2024-04-27 10:51:53 +02:00
./nix.nix
./security.nix
./python.nix
./rust.nix
./nvim.nix
./lsp.nix
2024-05-17 12:18:20 +02:00
./git.nix
2024-05-18 16:41:17 +02:00
./c.nix
./java.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
unzip
p7zip
fbcat
gomuks
ranger
imagemagick
nmap
parted
expect
]
++ optionals graphical [
wev
qdirstat
libva-utils
gparted
];
environment.shellAliases = {
":q" = "exit";
"ls" = "eza";
"lix" = "nix";
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-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;
programs.ssh = {
startAgent = true;
enableAskPassword = graphical;
askPassword = mkIf graphical (getExe pkgs.lxqt.lxqt-openssh-askpass);
2024-05-07 23:31:41 +02:00
};
2024-05-11 22:55:59 +02:00
programs.thefuck.enable = true;
};
2024-05-11 22:55:59 +02:00
options.grimmShared.tooling = {
enable = mkEnableOption "grimm-tooling";
2024-05-18 16:41:17 +02:00
supportedLangs = mkOption {
type = types.listOf (types.enum [ ]);
default = [ ];
description = "Languages for which to enable support";
};
};
2024-03-24 16:59:47 +01:00
}