dotfiles/home.nix

169 lines
3.7 KiB
Nix
Raw Normal View History

{ config, pkgs, ... }: {
imports = [
./modules/golang.nix
./modules/haskell.nix
./modules/nodejs.nix
./modules/python.nix
./modules/rust.nix
];
2020-11-11 08:15:50 -05:00
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Home Manager needs a bit of information about you and the
# paths it should manage.
# home.username = builtins.getEnv "USER";
# home.homeDirectory = builtins.getEnv "HOME";
2020-11-11 08:15:50 -05:00
home.sessionPath = [ "$HOME/.local/bin" "$HOME/.emacs.d/bin" ];
home.packages = with pkgs; [
aws
cmake
direnv
docker
docker-compose
fd
git
gitAndTools.gh
google-cloud-sdk
2021-03-02 20:51:29 -05:00
heroku
htop
jq
mr
niv
nixfmt
pinentry
ripgrep
sqlite
2020-11-17 17:34:43 -05:00
wakatime
2020-11-11 08:15:50 -05:00
];
programs = {
zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
initExtra = ''
unset RPS1
eval $(starship init zsh)
'';
2020-11-11 08:15:50 -05:00
oh-my-zsh = {
enable = true;
plugins = [
2020-12-28 20:09:32 -05:00
"asdf"
2020-11-17 17:34:43 -05:00
"direnv"
"docker"
"docker-compose"
"gcloud"
2020-11-11 08:15:50 -05:00
"git"
"ssh-agent"
"tmux"
];
};
sessionVariables = { EDITOR = "vim"; };
};
dircolors = {
enable = true;
enableZshIntegration = true;
};
starship = {
enable = true;
enableZshIntegration = false;
settings = {
character = {
success_symbol = "[»](bold green) ";
error_symbol = "[](bold red) ";
};
directory = {
fish_style_pwd_dir_length = 1;
truncation_length = 1;
};
hostname = {
ssh_only = false;
format = "[$hostname]($style):";
};
gcloud = { disabled = true; };
kubernetes = { disabled = false; };
username = { format = "[$user]($style)@"; };
};
};
2020-11-11 08:15:50 -05:00
git = {
enable = true;
userName = "James Walker";
2020-11-11 08:15:50 -05:00
userEmail = "walkah@walkah.net";
aliases = {
lg =
"log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
st = "status -s";
undo = "reset HEAD~1 --mixed";
};
extraConfig = {
github.user = "walkah";
2020-12-28 20:09:32 -05:00
init.defaultBranch = "main";
pull.rebase = true;
rebase.autoStash = true;
};
2020-11-11 08:15:50 -05:00
signing = {
key = "8896FEC44D47A81C";
2020-11-11 08:15:50 -05:00
signByDefault = true;
};
};
gpg = {
enable = true;
settings = { default-key = "8896FEC44D47A81C"; };
2020-11-11 08:15:50 -05:00
};
tmux = {
enable = true;
extraConfig = ''
set -g set-titles on
set -g set-titles-string "[#S] #W@#h (#I)"
set -g status-bg black
set -g status-fg white
'';
newSession = true;
shortcut = "o";
terminal = "screen-256color";
2020-11-11 08:15:50 -05:00
};
2020-11-27 18:40:30 -05:00
2021-01-31 12:57:57 -05:00
emacs = {
2020-11-27 18:40:30 -05:00
enable = true;
2021-01-31 12:57:57 -05:00
package = pkgs.emacs-nox;
2020-11-27 18:40:30 -05:00
extraPackages = epkgs: [ epkgs.vterm ];
2021-01-31 12:57:57 -05:00
};
2020-11-11 08:15:50 -05:00
vim = { enable = true; };
};
services = if (pkgs.stdenv.isLinux) then {
lorri.enable = true;
syncthing.enable = true;
gpg-agent = {
enable = true;
enableSshSupport = true;
extraConfig = ''
allow-emacs-pinentry
allow-loopback-pinentry
'';
};
} else
{ };
2020-11-11 08:15:50 -05:00
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "21.03";
}