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
|
|
|
|
mkOption
|
|
|
|
types
|
|
|
|
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
|
2024-04-28 19:43:56 +02:00
|
|
|
./security.nix
|
|
|
|
./python.nix
|
2024-05-15 17:37:03 +02:00
|
|
|
./rust.nix
|
|
|
|
./nvim.nix
|
|
|
|
./lsp.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 &'')
|
|
|
|
(writeShellScriptBin "silent-add" "git add --intent-to-add $@ ; git update-index --assume-unchanged $@")
|
|
|
|
|
|
|
|
urlencode
|
|
|
|
pstree
|
|
|
|
file
|
|
|
|
wget
|
|
|
|
hyfetch
|
|
|
|
util-linux
|
|
|
|
btop
|
|
|
|
linuxPackages.perf
|
|
|
|
eza
|
|
|
|
|
|
|
|
gcc
|
|
|
|
jdk17
|
|
|
|
pkg-config
|
|
|
|
unzip
|
|
|
|
p7zip
|
|
|
|
|
|
|
|
tea
|
|
|
|
|
|
|
|
fbcat
|
|
|
|
gomuks
|
|
|
|
ranger
|
|
|
|
|
|
|
|
visualvm
|
|
|
|
imagemagick
|
|
|
|
nmap
|
|
|
|
|
|
|
|
parted
|
|
|
|
glib
|
|
|
|
glibc
|
|
|
|
expect
|
|
|
|
]
|
|
|
|
++ optionals graphical [
|
|
|
|
wev
|
|
|
|
qdirstat
|
|
|
|
libva-utils
|
|
|
|
gparted
|
|
|
|
jetbrains.clion
|
|
|
|
jetbrains.idea-community
|
|
|
|
];
|
|
|
|
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
lfs.enable = true;
|
|
|
|
config = {
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
credential.username = tooling.git_user;
|
|
|
|
user.name = tooling.git_user;
|
|
|
|
user.email = tooling.git_email;
|
|
|
|
push.autoSetupRemote = true;
|
|
|
|
core.autocrlf = "input";
|
|
|
|
commit.gpgsign = true;
|
|
|
|
pull.rebase = true;
|
|
|
|
alias = {
|
|
|
|
pfusch = "push --force-with-lease --force-if-includes";
|
|
|
|
fuck = "reset HEAD~1";
|
|
|
|
fixup = "commit --fixup";
|
2024-05-06 23:22:32 +02:00
|
|
|
};
|
2024-03-24 16:59:47 +01:00
|
|
|
};
|
2024-05-11 22:55:59 +02:00
|
|
|
};
|
2024-04-10 16:51:28 +02:00
|
|
|
|
2024-05-11 22:55:59 +02:00
|
|
|
environment.shellAliases = {
|
|
|
|
":q" = "exit";
|
|
|
|
"ls" = "eza";
|
|
|
|
"lix" = "nix";
|
|
|
|
};
|
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-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-04-16 12:09:17 +02:00
|
|
|
|
2024-05-11 22:55:59 +02:00
|
|
|
options.grimmShared.tooling = {
|
2024-04-16 12:09:17 +02:00
|
|
|
enable = mkEnableOption "grimm-tooling";
|
|
|
|
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
|
|
|
}
|