You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

181 lines
3.6 KiB
Nix

{
config,
lib,
pkgs,
...
3 months ago
}:
let
cfg = config.x-banananetwork.useable;
in
{
options = {
x-banananetwork.useable = {
enable = lib.mkEnableOption ''
a set of opionated options to make systems useable & debugable for users.
This means e.g. adding common, useful tools and add documentation.
'';
};
};
config = lib.mkIf cfg.enable {
documentation = {
3 months ago
enable = true;
dev.enable = true;
doc.enable = true;
info.enable = true;
man = {
3 months ago
enable = true;
generateCaches = true;
man-db.enable = false; # see mandoc
mandoc = {
enable = true;
};
3 months ago
};
3 months ago
nixos = {
enable = true;
includeAllModules = true;
};
3 months ago
};
environment.systemPackages =
with pkgs;
let
inherit (lib.lists) flatten optional optionals;
in
flatten [
(optional (
config.services.hardware.bolt.enable && config.services.desktopManager.plasma6.enable
) kdePackages.plasma-thunderbolt) # TODO upstream
(optionals config.hardware.graphics.amd.enable [ nvtopPackages.amd ])
(optionals config.hardware.graphics.intel.enable [
intel-gpu-tools
nvtopPackages.intel
])
bat
batmon # TODO only on systems wich batteries
manix
massren
nethogs
reptyr
psitop
unixtools.xxd
up # ultimate plumber
usbtop
];
3 months ago
programs = {
bandwhich.enable = true;
git = {
enable = true;
config = {
advice = {
detachedHead = true;
};
alias = {
lg1 = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
lg2 = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
lg = ''!git lg1'';
};
core = {
autocrlf = "input";
};
init = {
defaultBranch = "main";
};
pull = {
ff = "only";
};
push = {
autoSetupRemote = true;
};
3 months ago
};
};
iftop.enable = true;
iotop.enable = true;
less = {
enable = true;
};
liboping.enable = true;
mtr.enable = true;
nano = {
enable = true;
nanorc = ''
set nowrap
set tabtospaces
set tabsize 2
'';
syntaxHighlight = true;
};
tmux = {
plugins = with pkgs.tmuxPlugins; [
better-mouse-mode
sensible
];
secureSocket = true; # does not survive user logout
};
zsh = {
autosuggestions = {
enable = true;
strategy = [
"history"
"completion"
];
};
enable = true;
enableBashCompletion = true;
enableCompletion = true;
syntaxHighlighting = {
enable = true;
highlighters = [
"main"
"brackets"
"root"
];
};
vteIntegration = true;
};
};
x-banananetwork = {
allCommon.enable = true;
debugMinimal.enable = true;
};
# TODO withlist:
# - update tmuxPlugins.sensible in nixpkgs (e.g. https://github.com/NixOS/nixpkgs/pull/272954)
};
}