grimm-nixos-laptop/common/toolchains.nix

145 lines
3.2 KiB
Nix
Raw Normal View History

2024-04-18 21:16:40 +02:00
{ pkgs, config, lib, inputs, ... }:
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-03-24 16:59:47 +01:00
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 $@")
2024-04-20 19:50:23 +02:00
(writeShellScriptBin "nixpkgs-review-head" "nixpkgs-review rev HEAD")
nixpkgs-review
2024-04-10 16:51:28 +02:00
nixpkgs-fmt
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
fbcat
gomuks
gotop
ranger
nix-search-cli
wget
tree
file
util-linux
visualvm
ffmpeg-full
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
# inputs.nix-locate.packages."${system}".default
2024-04-20 19:50:23 +02:00
inputs.hammering.packages."${system}".default
2024-04-18 21:16:40 +02:00
nix-output-monitor
expect
2024-03-24 16:59:47 +01:00
] ++ 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;
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-03-24 16:59:47 +01:00
programs.neovim = {
enable = true;
viAlias = true;
defaultEditor = true;
configure = {
2024-04-10 16:51:28 +02:00
customRC = ''
set number
set hidden
set fileencodings=utf-8
set nocompatible
set clipboard+=unnamedplus
if filereadable($HOME . "/.vimrc")
source ~/.vimrc
endif
'';
2024-03-24 16:59:47 +01:00
packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
2024-04-10 16:51:28 +02:00
start = [
2024-03-24 16:59:47 +01:00
vim-nix
vim-scala
fugitive
];
2024-04-10 16:51:28 +02:00
2024-03-24 16:59:47 +01:00
# manually loadable by calling `:packadd $plugin-name`
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-03-24 16:59:47 +01:00
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";
};
};
2024-03-24 16:59:47 +01:00
}