145 lines
3.2 KiB
Nix
145 lines
3.2 KiB
Nix
{ pkgs, config, lib, inputs, ... }:
|
|
let
|
|
cfg = config.grimmShared;
|
|
in
|
|
{
|
|
config = with cfg; lib.mkIf (enable && tooling.enable) {
|
|
environment.systemPackages = with pkgs; [
|
|
(writeShellScriptBin "silent-add" "git add --intent-to-add $@ ; git update-index --assume-unchanged $@")
|
|
(writeShellScriptBin "systemd-owner" "systemctl show -pUser,UID $@")
|
|
(writeShellScriptBin "nix-referrers" "nix-store --query --referrers $@")
|
|
(writeShellScriptBin "nixpkgs-review-head" "nixpkgs-review rev HEAD")
|
|
nixpkgs-review
|
|
nixpkgs-fmt
|
|
gcc
|
|
jdk17
|
|
python3
|
|
pkg-config
|
|
unzip
|
|
p7zip
|
|
|
|
tea
|
|
|
|
fbcat
|
|
gomuks
|
|
gotop
|
|
ranger
|
|
nix-search-cli
|
|
|
|
wget
|
|
tree
|
|
file
|
|
util-linux
|
|
visualvm
|
|
ffmpeg-full
|
|
imagemagick
|
|
nmap
|
|
|
|
hyfetch
|
|
parted
|
|
glib
|
|
glibc
|
|
# inputs.nix-locate.packages."${system}".default
|
|
inputs.hammering.packages."${system}".default
|
|
nix-output-monitor
|
|
expect
|
|
] ++ lib.optionals cfg.graphical [
|
|
qdirstat
|
|
libva-utils
|
|
glxinfo
|
|
alacritty
|
|
vulkan-tools
|
|
pdfarranger
|
|
nomacs
|
|
gparted
|
|
];
|
|
|
|
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;
|
|
|
|
|
|
programs.neovim = {
|
|
enable = true;
|
|
viAlias = true;
|
|
defaultEditor = true;
|
|
configure = {
|
|
customRC = ''
|
|
set number
|
|
set hidden
|
|
set fileencodings=utf-8
|
|
set nocompatible
|
|
set clipboard+=unnamedplus
|
|
if filereadable($HOME . "/.vimrc")
|
|
source ~/.vimrc
|
|
endif
|
|
'';
|
|
packages.myVimPackage = with pkgs.vimPlugins; {
|
|
# loaded on launch
|
|
start = [
|
|
vim-nix
|
|
vim-scala
|
|
fugitive
|
|
];
|
|
|
|
# manually loadable by calling `:packadd $plugin-name`
|
|
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";
|
|
|
|
pass = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
description = "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";
|
|
};
|
|
};
|
|
}
|