dotfiles.nix/home/default.nix

133 lines
3.7 KiB
Nix

{ config, pkgs, lib, ... }:
{
# Import config broken out into files
imports = [
./git.nix
./kitty.nix
./neovim.nix
./shells.nix
];
home.enableNixpkgsReleaseCheck = true;
# Packages with configuration --------------------------------------------------------------- {{{
programs = {
# fancy shell history
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.atuin.enable
atuin = {
enable = true;
settings = { };
};
# a nicer cat
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.bat.enable
bat = {
enable = true;
config = {
style = "plain";
};
};
# 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;
};
# Firefox
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.firefox.enable
# firefox = {
# enable = true;
# package = pkgs.firefox;
# };
# Htop
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.htop.enable
htop = {
enable = true;
settings = {
show_program_path = true;
};
};
# See `./shells.nix` for more on how this is used.
fish = {
functions = {
set-bat-colors = {
body = ''set -xg BAT_THEME "Solarized ($term_background)"'';
onVariable = "term_background";
};
};
interactiveShellInit = ''
# Init atuin
atuin init fish | source
bind -M insert -k up _atuin_search
bind -M insert \eOA _atuin_search
bind -M insert \e\[A _atuin_search
# Set `bat` colors based on value of `$term_backdround` when shell starts up.
set-bat-colors
'';
};
};
# }}}
# Other packages ----------------------------------------------------------------------------- {{{
home.packages = with pkgs; [
# Some basics
abduco # lightweight session management
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`
htop # fancy version of `top`
hyperfine # benchmarking tool
mosh # wrapper for `ssh` that better and not dropping connections
procs # fancy version of `ps`
ripgrep # better version of `grep`
tealdeer # rust implementation of `tldr`
thefuck
unrar # extract RAR archives
wget
xz # extract XZ archives
# Dev stuff
cloc # source code line counter
jq
# Useful nix related tools
cachix # adding/managing alternative binary caches hosted by Cachix
comma # run software from without installing it
niv # easy dependency management for nix projects
nixpkgs-fmt
nix-prefetch-git
# nodePackages.node2nix
] ++ lib.optionals stdenv.isDarwin [
cocoapods
m-cli # useful macOS CLI commands
# prefmanager # tool for working with macOS defaults
];
# }}}
# Misc configuration files --------------------------------------------------------------------{{{
# https://docs.haskellstack.org/en/stable/yaml_configuration/#non-project-specific-config
# home.file.".stack/config.yaml".text = lib.generators.toYAML {} {
# templates = {
# scm-init = "git";
# params = {
# author-name = config.programs.git.userName;
# author-email = config.programs.git.userEmail;
# github-username = "malob";
# };
# };
# nix.enable = true;
# };
# Stop `parallel` from displaying citation warning
# home.file.".parallel/will-cite".text = "";
# }}}
}