106 lines
3.0 KiB
Nix
106 lines
3.0 KiB
Nix
|
{ config, pkgs, lib, ... }:
|
||
|
|
||
|
{
|
||
|
# Programs + packages with configuration --------------------------------------------------------------- {{{
|
||
|
|
||
|
programs = {
|
||
|
# a nicer cat
|
||
|
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.bat.enable
|
||
|
bat = {
|
||
|
enable = true;
|
||
|
config = {
|
||
|
style = "auto";
|
||
|
};
|
||
|
};
|
||
|
# Direnv, load and unload environment variables depending on the current directory.
|
||
|
# https://direnv.net
|
||
|
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.direnv.enable
|
||
|
direnv = {
|
||
|
enable = true;
|
||
|
nix-direnv.enable = true;
|
||
|
};
|
||
|
# See `./shells.nix` for more on how this is used.
|
||
|
fish = {
|
||
|
functions = {
|
||
|
set-bat-colors = {
|
||
|
body = ''
|
||
|
if test "$term_background" = light
|
||
|
set -xg BAT_THEME "OneHalfLight"
|
||
|
else
|
||
|
set -xg BAT_THEME "OneHalfDark"
|
||
|
end
|
||
|
'';
|
||
|
onVariable = "term_background";
|
||
|
};
|
||
|
};
|
||
|
interactiveShellInit = ''
|
||
|
# Set `bat` colors based on value of `$term_backdround` when shell starts up.
|
||
|
set-bat-colors
|
||
|
'';
|
||
|
};
|
||
|
helix = {
|
||
|
enable = true;
|
||
|
};
|
||
|
ssh = {
|
||
|
enable = true;
|
||
|
matchBlocks."*".extraOptions = {
|
||
|
UseKeychain = "yes";
|
||
|
AddKeysToAgent = "yes";
|
||
|
} // lib.optionalAttrs pkgs.stdenv.isDarwin {
|
||
|
# TODO: gate this behind a check if the cask is present
|
||
|
IdentityAgent = "~/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
|
||
|
};
|
||
|
};
|
||
|
# vscode
|
||
|
vscode = {
|
||
|
enable = true;
|
||
|
# extensions = [ pijul-vscode ];
|
||
|
};
|
||
|
};
|
||
|
# }}}
|
||
|
|
||
|
# Other packages ----------------------------------------------------------------------------- {{{
|
||
|
|
||
|
home.packages = with pkgs; [
|
||
|
# System
|
||
|
abduco # lightweight session management
|
||
|
atool # archive tool
|
||
|
bottom # fancy version of `top` with ASCII graphs
|
||
|
coreutils
|
||
|
curl
|
||
|
du-dust # fancy version of `du`
|
||
|
exa # fancy version of `ls`
|
||
|
fd # fancy version of `find`
|
||
|
mosh # wrapper for `ssh` that better at not dropping connections
|
||
|
procs # fancy version of `ps`
|
||
|
pv # pipe progress viewer
|
||
|
rage # command line file encryption
|
||
|
thefuck
|
||
|
unrar # extract RAR archives
|
||
|
wget
|
||
|
xz # extract XZ archives
|
||
|
|
||
|
# Dev stuff
|
||
|
cloc # source code line counter
|
||
|
doctl # command line tools for digitalocean
|
||
|
flyctl # command line tools for fly.io
|
||
|
hyperfine # benchmarking tool
|
||
|
jq # json processor
|
||
|
pijul # alternative to `git`
|
||
|
ripgrep # better version of `grep`
|
||
|
tealdeer # rust implementation of `tldr`
|
||
|
xh # reimplementation of `httpie` in rust
|
||
|
|
||
|
# Useful nix related tools
|
||
|
cachix # adding/managing alternative binary caches hosted by Cachix
|
||
|
comma # run software from without installing it
|
||
|
nixpkgs-fmt
|
||
|
nix-prefetch-git
|
||
|
nix-tree
|
||
|
] ++ lib.optionals stdenv.isDarwin [
|
||
|
m-cli # useful macOS CLI commands
|
||
|
is-dark-mode # see /overlays/colors.nix
|
||
|
];
|
||
|
# }}}
|
||
|
}
|