dotfiles/nix/core.nix

226 lines
3.9 KiB
Nix
Raw Normal View History

2024-03-21 19:37:29 +00:00
{ lib, config, pkgs, ... }:
2024-03-21 18:33:54 +00: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 should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
2024-07-05 11:52:42 +00:00
# VCS
2024-03-21 18:33:54 +00:00
git
git-lfs
difftastic
2024-07-05 11:52:42 +00:00
jujutsu
2024-03-21 18:33:54 +00:00
# Tools
ripgrep
bat
tmux
jq
yq
2024-03-21 18:33:54 +00:00
fd
fzf
gnumake
age
sops
http-prompt
watchexec
devbox
nodePackages.prettier
direnv
2024-03-28 14:33:00 +00:00
tree
bottom
2024-07-20 07:41:01 +00:00
nmap
2024-07-05 11:52:42 +00:00
# Refactoring
ast-grep
2024-05-16 20:13:23 +00:00
rename
2024-03-21 18:33:54 +00:00
2024-06-12 07:57:00 +00:00
# VMs
kraft
qemu
2024-05-31 06:56:35 +00:00
# Containers
dive
ctop
2024-08-01 09:02:53 +00:00
skopeo
2024-05-31 06:56:35 +00:00
# JavaScript
2024-03-21 18:33:54 +00:00
nodejs_20
2024-04-25 18:46:12 +00:00
deno
2024-05-23 09:02:37 +00:00
yarn
2024-03-21 18:33:54 +00:00
2024-07-01 10:59:21 +00:00
# Python
black
2024-03-21 18:33:54 +00:00
# Golang
go
gopls
golangci-lint
# C & CPP
gcc
# Rust
cargo
# Shell
zsh
shfmt
2024-06-12 07:57:00 +00:00
shellcheck
2024-03-21 18:33:54 +00:00
# Lua
stylua
2024-05-31 06:56:35 +00:00
# Databases
redis
mongodb-tools
mongosh
2024-03-21 18:33:54 +00:00
# Services
2024-05-31 06:56:35 +00:00
tailscale
2024-03-21 18:33:54 +00:00
flyctl
awscli2
2024-06-19 13:19:17 +00:00
# Terraform
2024-08-01 09:02:53 +00:00
tenv
2024-06-19 13:19:17 +00:00
tflint
2024-07-20 07:41:01 +00:00
terragrunt
2024-06-19 13:19:17 +00:00
2024-03-21 18:33:54 +00:00
# Kubernetes
2024-05-31 06:56:35 +00:00
kubernetes-helm
2024-03-21 18:33:54 +00:00
k9s
kubectl
2024-05-16 06:24:20 +00:00
kubectx
2024-07-20 07:41:01 +00:00
talosctl
cilium-cli
kubelogin-oidc
2024-03-21 18:33:54 +00:00
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
"~/.tmux.conf".source = ../tmux/tmux.conf;
"~/.ssh/authorized_keys".source = ../ssh/authorized_keys;
"${config.xdg.configHome}/starship.toml".source = ../starship/starship.toml;
"${config.xdg.configHome}/bat" = {
recursive = true;
source = ../bat;
};
"${config.xdg.configHome}/kitty" = {
recursive = true;
source = ../kitty;
};
"${config.xdg.configHome}/nvim" = {
recursive = true;
source = ../nvim;
};
"${config.xdg.configHome}/Code/User" = {
recursive = true;
source = ../code;
};
2024-03-21 18:33:54 +00:00
};
2024-03-21 19:37:29 +00:00
programs.gh = {
enable = true;
gitCredentialHelper.enable = true;
};
2024-03-21 18:33:54 +00:00
programs.git = {
enable = true;
userName = "Tine";
userEmail = "tine@tjo.space";
difftastic.enable = true;
lfs.enable = true;
2024-03-21 19:37:29 +00:00
includes = [
{ path = "~/.gitconfig.local"; }
];
2024-03-21 18:33:54 +00:00
extraConfig = {
user = {
signingkey = "~/.ssh/id_ed25519";
};
2024-05-07 10:45:52 +00:00
rerere = {
enabled = true;
};
2024-03-21 18:33:54 +00:00
commit = {
gpgsign = true;
};
gpg = {
format = "ssh";
};
2024-03-21 19:37:29 +00:00
credential = {
helper = "secretservice";
2024-03-21 18:33:54 +00:00
};
init = {
defaultBranch = "main";
};
push = {
autoSetupRemote = true;
};
pull = {
ff = "only";
};
};
};
programs.starship = {
enable = true;
};
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
programs.direnv = {
enable = true;
};
programs.zsh = {
enable = true;
history = {
size = 10000000;
save = 10000000;
ignoreAllDups = true;
path = "${config.xdg.dataHome}/zsh/history";
};
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
shellAliases = {
"ll" = "ls -l";
"gicm" = "(git checkout main || git checkout master) && git pull";
"gic" = "git checkout";
"gip" = "git pull";
2024-05-16 20:13:23 +00:00
"ga" = "git add";
"gc" = "git commit";
"gr" = "git stash && gicm && git rebase main";
2024-05-16 20:13:52 +00:00
"gs" = "git status";
"gl" = "git log";
"gp" = "git push";
2024-03-21 18:33:54 +00:00
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}