160 lines
3.3 KiB
Nix
160 lines
3.3 KiB
Nix
{ pkgs, config, lib, ... }:
|
|
let
|
|
cfg = config.grimmShared;
|
|
in
|
|
{
|
|
imports = [
|
|
./lilypond.nix
|
|
./nix.nix
|
|
];
|
|
|
|
config = with cfg; lib.mkIf (enable && tooling.enable) {
|
|
environment.systemPackages = with pkgs; [
|
|
(writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@")
|
|
(writeShellScriptBin "lsiommu" ./lsiommu)
|
|
(writeShellScriptBin "tree" "${lib.getExe pkgs.eza} -T --git -lh --no-permissions --no-user --no-filesize --no-time")
|
|
|
|
gcc
|
|
jdk17
|
|
python3
|
|
pkg-config
|
|
unzip
|
|
p7zip
|
|
|
|
tea
|
|
eza
|
|
|
|
fbcat
|
|
gomuks
|
|
gotop
|
|
ranger
|
|
wget
|
|
file
|
|
pypy3
|
|
util-linux
|
|
visualvm
|
|
imagemagick
|
|
nmap
|
|
|
|
hyfetch
|
|
parted
|
|
glib
|
|
glibc
|
|
expect
|
|
neovim-remote
|
|
] ++ lib.optionals cfg.graphical [
|
|
qdirstat
|
|
libva-utils
|
|
glxinfo
|
|
alacritty
|
|
vulkan-tools
|
|
pdfarranger
|
|
nomacs
|
|
gparted
|
|
zathura
|
|
];
|
|
|
|
programs.git = {
|
|
enable = true;
|
|
lfs.enable = true;
|
|
config = {
|
|
init.defaultBranch = "main";
|
|
credential.username = cfg.tooling.git_user;
|
|
core.editor = lib.getExe pkgs.neovim;
|
|
user.name = cfg.tooling.git_user;
|
|
user.email = cfg.tooling.git_email;
|
|
push.autoSetupRemote = true;
|
|
};
|
|
};
|
|
|
|
programs.tmux = {
|
|
enable = true;
|
|
historyLimit = 42000;
|
|
#keyMode = "vi";
|
|
};
|
|
|
|
# virtualisation.docker.enable = true;
|
|
|
|
|
|
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
|
|
vim-scala
|
|
fugitive
|
|
];
|
|
|
|
programs.neovim = {
|
|
enable = true;
|
|
viAlias = true;
|
|
defaultEditor = true;
|
|
configure = {
|
|
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;
|
|
opt = [ ];
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.xonsh = {
|
|
enable = true;
|
|
package = pkgs.xonsh.override {
|
|
extraPackages = ps: with ps; [
|
|
requests
|
|
matplotlib
|
|
numpy
|
|
scipy
|
|
];
|
|
};
|
|
};
|
|
programs.ssh.startAgent = true;
|
|
programs.thefuck.enable = true;
|
|
};
|
|
|
|
options.grimmShared.tooling = with lib; {
|
|
enable = mkEnableOption "grimm-tooling";
|
|
|
|
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";
|
|
};
|
|
};
|
|
|
|
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";
|
|
};
|
|
};
|
|
}
|