2021-12-26 08:02:57 +00:00
|
|
|
# Arsenal for development (which is rare nowadays). ;p
|
|
|
|
# If you're looking for text editors, go to `./editors.nix`.
|
2023-12-10 09:49:52 +00:00
|
|
|
{ config, lib, pkgs, ... }@attrs:
|
2021-11-29 09:56:24 +00:00
|
|
|
|
2024-01-22 06:48:55 +00:00
|
|
|
let cfg = config.suites.dev;
|
2021-12-11 05:16:45 +00:00
|
|
|
in {
|
2024-01-22 06:48:55 +00:00
|
|
|
options.suites.dev = {
|
2021-12-26 08:02:57 +00:00
|
|
|
enable =
|
2023-12-17 16:16:48 +00:00
|
|
|
lib.mkEnableOption "basic set of programs for development setup";
|
2021-12-11 05:16:45 +00:00
|
|
|
shell.enable =
|
2023-12-17 16:16:48 +00:00
|
|
|
lib.mkEnableOption "enhanced shell configuration";
|
2022-02-02 04:25:03 +00:00
|
|
|
extras.enable = lib.mkEnableOption "additional tools for development stuff";
|
2023-09-23 12:23:22 +00:00
|
|
|
shaders.enable = lib.mkEnableOption "tools for developing shaders";
|
2023-10-17 05:26:06 +00:00
|
|
|
servers.enable = lib.mkEnableOption "toolkit for managing servers from your home";
|
2023-10-26 14:09:41 +00:00
|
|
|
funsies.enable = lib.mkEnableOption "installation of command-line applications for funsies";
|
2023-12-12 01:50:08 +00:00
|
|
|
coreutils-replacement.enable = lib.mkEnableOption "replacement of coreutils with sane default options";
|
2021-12-11 05:16:45 +00:00
|
|
|
};
|
2021-11-29 09:56:24 +00:00
|
|
|
|
2021-12-11 05:16:45 +00:00
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
|
|
({
|
|
|
|
home.packages = with pkgs; [
|
2023-09-02 17:44:08 +00:00
|
|
|
cookiecutter # Cookiecutter templates for your mama (which is you).
|
2023-05-27 09:47:16 +00:00
|
|
|
dasel # Universal version of jq.
|
|
|
|
moar # More 'more'.
|
2023-08-19 04:05:37 +00:00
|
|
|
perlPackages.vidir # Bulk rename for your organizing needs in the terminal.
|
2021-12-11 05:16:45 +00:00
|
|
|
];
|
2023-04-20 06:57:41 +00:00
|
|
|
|
2023-06-23 09:12:31 +00:00
|
|
|
# Git interface for the lazy who cannot be asked to add hunks properly.
|
|
|
|
programs.lazygit = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
gui = {
|
|
|
|
expandFocusedSidePanel = true;
|
|
|
|
showBottomLine = false;
|
|
|
|
skipRewordInEditorWarning = true;
|
|
|
|
theme = {
|
|
|
|
selectedLineBgColor = [ "reverse" ];
|
|
|
|
selectedRangeBgColor = [ "reverse" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
notARepository = "skip";
|
|
|
|
};
|
|
|
|
};
|
2023-06-23 09:12:10 +00:00
|
|
|
|
2023-07-25 12:22:16 +00:00
|
|
|
# The file manager of choice.
|
|
|
|
programs.lf = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
keybindings = {
|
|
|
|
"<enter>" = "shell";
|
|
|
|
"gr" = "cd /";
|
|
|
|
};
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
# Aesthetics.
|
|
|
|
color256 = true;
|
|
|
|
dircounts = true;
|
|
|
|
hidden = true;
|
|
|
|
drawbox = true;
|
|
|
|
timefmt = "2006-01-02 15:04:05";
|
|
|
|
|
|
|
|
# Scrolling options.
|
|
|
|
wrapscroll = true;
|
|
|
|
scrolloff = 10;
|
|
|
|
};
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
cmap <tab> cmd-menu-complete
|
|
|
|
cmap <backtab> cmd-menu-complete-back
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-12-12 01:58:04 +00:00
|
|
|
programs.tealdeer = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
display.use_pager = true;
|
|
|
|
description = {
|
|
|
|
foreground = "green";
|
|
|
|
background = "black";
|
|
|
|
};
|
|
|
|
command.underline = true;
|
|
|
|
updates.auto_update = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-12-17 16:16:48 +00:00
|
|
|
# Echolocation. Since you're using a home-manager configuration, you're
|
|
|
|
# most likely using Nix anyways.
|
2024-01-01 05:56:10 +00:00
|
|
|
programs.nix-index.enable =
|
|
|
|
let
|
2024-01-22 06:50:00 +00:00
|
|
|
hasNixOSModuleEnabled = attrs ? nixosConfig && lib.attrByPath [ "programs" "nix-index" "enable" ] false attrs.nixosConfig;
|
2024-01-01 05:56:10 +00:00
|
|
|
in
|
|
|
|
!hasNixOSModuleEnabled;
|
2021-12-11 05:16:45 +00:00
|
|
|
})
|
2021-11-29 09:56:24 +00:00
|
|
|
|
2023-12-12 01:50:21 +00:00
|
|
|
# Level up your terminal-dwelling skills with these.
|
2021-12-11 05:16:45 +00:00
|
|
|
(lib.mkIf cfg.shell.enable {
|
2023-12-17 16:16:48 +00:00
|
|
|
# A fuzzy finder that enables fuzzy finding not furry finding, a common misconception.
|
|
|
|
programs.fzf =
|
|
|
|
let
|
2023-12-26 02:20:32 +00:00
|
|
|
fd = lib.getExe' pkgs.fd "fd";
|
2023-12-17 16:16:48 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
changeDirWidgetCommand = "${fd} --type directory --unrestricted";
|
|
|
|
defaultCommand = "${fd} --type file --hidden";
|
|
|
|
};
|
|
|
|
|
2022-11-06 09:38:51 +00:00
|
|
|
# Supercharging your shell history. Just don't forget to flush them out
|
|
|
|
# before doing questionable things.
|
2022-07-14 00:04:24 +00:00
|
|
|
programs.atuin = {
|
|
|
|
enable = true;
|
2023-08-01 09:31:13 +00:00
|
|
|
flags = [ "--disable-up-arrow" ];
|
2022-07-14 00:04:24 +00:00
|
|
|
settings = {
|
|
|
|
search_mode = "fuzzy";
|
|
|
|
filter_mode = "global";
|
|
|
|
};
|
|
|
|
};
|
2022-10-13 10:32:47 +00:00
|
|
|
|
2022-11-06 09:38:51 +00:00
|
|
|
# virtualenv but for anything else.
|
2021-12-11 05:16:45 +00:00
|
|
|
programs.direnv = {
|
|
|
|
enable = true;
|
2022-10-18 11:52:30 +00:00
|
|
|
config.global = {
|
|
|
|
load_dotenv = true;
|
|
|
|
strict_env = true;
|
|
|
|
};
|
2021-12-11 05:16:45 +00:00
|
|
|
nix-direnv.enable = true;
|
|
|
|
};
|
2022-02-02 04:25:03 +00:00
|
|
|
|
2022-11-06 09:38:51 +00:00
|
|
|
# Learn teleportation in the filesystem.
|
2022-10-13 10:32:47 +00:00
|
|
|
programs.zoxide.enable = true;
|
2022-11-06 09:38:51 +00:00
|
|
|
|
|
|
|
# Some lazy bastard's shell prompt configuration.
|
2021-12-11 05:16:45 +00:00
|
|
|
programs.starship = {
|
|
|
|
enable = true;
|
2022-06-09 05:00:07 +00:00
|
|
|
settings = {
|
|
|
|
add_newline = false;
|
|
|
|
hostname = {
|
|
|
|
ssh_only = false;
|
|
|
|
trim_at = "";
|
|
|
|
};
|
|
|
|
};
|
2021-12-11 05:16:45 +00:00
|
|
|
};
|
|
|
|
})
|
2022-02-02 04:25:03 +00:00
|
|
|
|
2023-12-18 10:44:27 +00:00
|
|
|
# Modern problems require modern tools.
|
2023-12-12 01:50:08 +00:00
|
|
|
(lib.mkIf cfg.coreutils-replacement.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
fd # Welp, a reliable find.
|
|
|
|
];
|
|
|
|
|
|
|
|
# dog > sky dog > cat.
|
|
|
|
programs.bat = {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
pager = "${lib.getBin pkgs.moar}/bin/moar";
|
|
|
|
theme = "base16";
|
|
|
|
style = "plain";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Your E last to the A.
|
|
|
|
programs.eza = {
|
|
|
|
enable = true;
|
2023-12-23 12:32:37 +00:00
|
|
|
enableAliases = true;
|
2023-12-12 01:50:08 +00:00
|
|
|
extraOptions = [
|
|
|
|
"--group-directories-first"
|
|
|
|
"--header"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# RIP indeed to grep.
|
|
|
|
programs.ripgrep = {
|
|
|
|
enable = true;
|
|
|
|
arguments = [
|
|
|
|
"--max-columns-preview"
|
|
|
|
"--colors=line:style:bold"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
2023-12-18 10:44:27 +00:00
|
|
|
# Extra extras.
|
2022-02-02 04:25:03 +00:00
|
|
|
(lib.mkIf cfg.extras.enable {
|
|
|
|
home.packages = with pkgs; [
|
2023-09-04 06:13:05 +00:00
|
|
|
gum # The fancy shell script toolkit.
|
2023-05-02 04:34:12 +00:00
|
|
|
hyperfine # Making sure your apps are not just fine but REEEEEEAAAAALY fine.
|
2023-05-02 04:33:15 +00:00
|
|
|
license-cli # A nice generator template for license files.
|
2023-09-11 10:19:18 +00:00
|
|
|
quilt # Patching right up yer' alley.
|
2023-09-11 10:20:00 +00:00
|
|
|
tokei # Stroking your programming ego by how many lines of C you've written.
|
2023-12-18 10:44:27 +00:00
|
|
|
treefmt # I like the rhyming tagline of this tool which is why it's here.
|
2023-09-11 10:20:00 +00:00
|
|
|
vhs # Declarative terminal tool demo.
|
2023-03-09 03:44:21 +00:00
|
|
|
zenith # Very fanciful system dashboard.
|
2022-02-02 04:25:03 +00:00
|
|
|
];
|
|
|
|
})
|
2023-09-23 12:23:22 +00:00
|
|
|
|
2023-12-18 10:44:27 +00:00
|
|
|
# Abuncha' shady tools.
|
2023-09-23 12:23:22 +00:00
|
|
|
(lib.mkIf cfg.shaders.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
bonzomatic # Shadertoys for desktop bozos.
|
|
|
|
shaderc # Make some seamless background loopy things.
|
|
|
|
];
|
|
|
|
})
|
2023-10-17 05:26:06 +00:00
|
|
|
|
|
|
|
(lib.mkIf cfg.servers.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
bind.dnsutils # Make DNS a little less fun.
|
|
|
|
kanidm # What is you?
|
|
|
|
ipcalc # Calculate how many stars are there in space.
|
|
|
|
geoip # Know where the spam came from.
|
2023-12-18 10:44:27 +00:00
|
|
|
sshfs # Intrude others' home and steal their shit, why don't 'ya?
|
2023-10-17 05:26:06 +00:00
|
|
|
whois # Doctor, are you not?
|
|
|
|
];
|
|
|
|
})
|
2023-10-26 14:09:41 +00:00
|
|
|
|
|
|
|
(lib.mkIf cfg.funsies.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
fastfetch # Fetch, fast!
|
|
|
|
asciiquarium-transparent # The closest thing to an actual aquarium (without the responsibility, of course).
|
2024-01-20 09:22:49 +00:00
|
|
|
cowsay # "WHUUUUUUUUUUUUUUUUUUUUUT?"
|
2023-10-26 14:09:41 +00:00
|
|
|
krabby # Kapture them Pikachus, bruh.
|
|
|
|
lavat # Where the lava at?
|
|
|
|
];
|
|
|
|
})
|
2021-12-11 05:16:45 +00:00
|
|
|
]);
|
2021-11-29 09:56:24 +00:00
|
|
|
}
|