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

166 lines
3.4 KiB
Nix
Raw Normal View History

2024-04-27 10:51:53 +02:00
{ pkgs, config, lib, ... }:
2024-04-10 16:51:28 +02:00
let
2024-03-24 16:59:47 +01:00
cfg = config.grimmShared;
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
2024-04-26 21:36:24 +02:00
];
2024-03-24 16:59:47 +01:00
config = with cfg; lib.mkIf (enable && tooling.enable) {
environment.systemPackages = with pkgs; [
(writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@")
2024-04-26 21:36:24 +02:00
(writeShellScriptBin "lsiommu" ./lsiommu)
2024-04-27 10:51:53 +02:00
(writeShellScriptBin "tree" "${lib.getExe pkgs.eza} -T --git -lh --no-permissions --no-user --no-filesize --no-time")
2024-04-26 21:36:24 +02:00
2024-03-24 16:59:47 +01:00
gcc
jdk17
python3
pkg-config
2024-04-18 21:16:40 +02:00
unzip
p7zip
2024-04-10 16:51:28 +02:00
2024-03-24 16:59:47 +01:00
tea
2024-04-27 10:51:53 +02:00
eza
2024-03-24 16:59:47 +01:00
fbcat
gomuks
gotop
ranger
wget
file
2024-04-26 10:25:17 +02:00
pypy3
2024-03-24 16:59:47 +01:00
util-linux
visualvm
imagemagick
nmap
2024-04-10 16:51:28 +02:00
2024-03-24 16:59:47 +01:00
hyfetch
parted
2024-04-01 12:04:43 +02:00
glib
2024-04-13 19:16:33 +02:00
glibc
2024-04-18 21:16:40 +02:00
expect
2024-04-26 21:36:24 +02:00
neovim-remote
2024-03-24 16:59:47 +01:00
] ++ lib.optionals cfg.graphical [
qdirstat
libva-utils
glxinfo
alacritty
vulkan-tools
pdfarranger
nomacs
gparted
2024-04-27 10:51:53 +02:00
zathura
2024-04-27 14:20:48 +02:00
imhex
libreoffice-qt
filezilla
obsidian
thunderbird
2024-03-24 16:59:47 +01:00
];
programs.git = {
enable = true;
lfs.enable = true;
config = {
init.defaultBranch = "main";
credential.username = cfg.tooling.git_user;
core.editor = lib.getExe pkgs.neovim;
2024-03-24 16:59:47 +01:00
user.name = cfg.tooling.git_user;
user.email = cfg.tooling.git_email;
2024-04-18 21:16:40 +02:00
push.autoSetupRemote = true;
2024-03-24 16:59:47 +01:00
};
};
2024-04-10 16:51:28 +02:00
2024-03-24 16:59:47 +01:00
programs.tmux = {
enable = true;
historyLimit = 42000;
#keyMode = "vi";
};
2024-04-10 16:51:28 +02:00
2024-04-18 21:16:40 +02:00
# virtualisation.docker.enable = true;
2024-04-10 16:51:28 +02:00
2024-04-26 21:36:24 +02:00
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
vim-scala
fugitive
];
2024-03-24 16:59:47 +01:00
programs.neovim = {
enable = true;
viAlias = true;
defaultEditor = true;
configure = {
2024-04-26 21:36:24 +02:00
customRC =
let
luarc = pkgs.writeText "init.lua" (lib.concatLines tooling.nvim.extraLuaRC);
in
''
set number
set hidden
set fileencodings=utf-8
set nocompatible
set clipboard+=unnamedplus
luafile ${luarc}
if filereadable($HOME . "/.vimrc")
source ~/.vimrc
endif
'';
packages.myVimPackage = {
start = tooling.nvim.plugins;
2024-03-24 16:59:47 +01:00
opt = [ ];
};
};
};
2024-03-31 16:07:15 +02:00
programs.xonsh = {
enable = true;
package = pkgs.xonsh.override {
2024-04-10 16:51:28 +02:00
extraPackages = ps: with ps; [
2024-03-31 16:07:15 +02:00
requests
matplotlib
numpy
scipy
2024-04-27 14:20:48 +02:00
pygobject3
2024-03-31 16:07:15 +02:00
];
};
};
2024-03-24 16:59:47 +01:00
programs.ssh.startAgent = true;
programs.thefuck.enable = true;
};
options.grimmShared.tooling = with lib; {
enable = mkEnableOption "grimm-tooling";
2024-04-26 21:36:24 +02:00
nvim = {
plugins = mkOption {
type = types.listOf types.package;
default = [ ];
description = "Extra vim plugins to include";
};
extraLuaRC = mkOption {
type = types.listOf types.nonEmptyStr;
default = [ ];
description = "Extra init LUA scripts";
};
};
2024-04-26 22:03:03 +02:00
pass = lib.mkEnableOption "Enables password-store, gnupg and such secret handling";
git_user = mkOption {
type = types.str;
default = "Grimmauld";
description = "Username for git to use";
};
git_email = mkOption {
type = types.str;
default = "${config.grimmShared.tooling.git_user}@grimmauld.de";
description = "Email for git to use";
};
};
2024-03-24 16:59:47 +01:00
}