-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.nix
180 lines (155 loc) · 3.96 KB
/
home.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
{ config, pkgs, ... }:
{
home.username = "matipan";
home.homeDirectory = "/home/matipan";
home.stateVersion = "22.05";
# User packages
home.packages = [
# shell
pkgs.zsh
pkgs.fzf
pkgs.tmux
pkgs.direnv
# tools
pkgs.htop
pkgs.bat
pkgs.tree
pkgs.neovim # for now I'll only manage the install not the config
pkgs.jq
pkgs.awscli2
pkgs.libuuid
# GUIs
pkgs.brave
# langs
pkgs.go
pkgs.gopls
pkgs.python311
pkgs.virtualenv
pkgs.nodejs-18_x
pkgs.yarn
pkgs.coursier
pkgs.gcc
];
# Programs
programs.home-manager.enable = true;
programs.neovim = {
extraConfig = ''
lua <<EOF
local status, ts_install = pcall(require, "nvim-treesitter.install")
if(status) then
ts_install.compilers = { "${pkgs.gcc}/bin/gcc" }
end
EOF
'';
};
programs.go = {
enable = true;
goPath = "code/go";
goPrivate = [ "github.com/lemonatio" ];
};
programs.zsh = {
enable = true;
autocd = true;
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = false;
sessionVariables = {
TERM = "xterm-256color";
DOCKER_BUILDKIT = 1;
GOPROXY = "https://proxy.golang.org";
GOSUMDB = "sum.golang.org";
GIT_EDITOR = "nvim";
EDITOR = "nvim";
PATH = "$PATH:$HOME/.local/bin/lua-language-server/bin:$HOME/bin/nvim-linux64/bin:$HOME/.local/bin:$HOME/lemon/lemi/bin:$HOME/.cargo/bin:$HOME/.npm-global/bin:$HOME/code/dotfiles/bin:$HOME/code/go/bin:$HOME/.npm-packages/bin:$HOME/.nube/bin";
AWS_PROFILE = "admin";
AWS_REGION = "sa-east-1";
NUBE_TIENDANUBE_ROOT="/home/matipan/code/tiendanube/core";
DOCKER_CLIENT_TIMEOUT="300";
COMPOSE_HTTP_TIMEOUT="300";
};
history = {
size = 1000000;
ignoreDups = true;
ignoreSpace = true;
expireDuplicatesFirst = true;
};
shellAliases = {
sz = "source $HOME/.zshrc";
c = "clear";
k = "kubectl";
vim = "nvim";
vi = "nvim";
loginaws = "aws sso login --profile admin";
code = "code --disable-gpu";
gw = "git worktree";
pbcopy = ''xclip -sel "clip"'';
};
oh-my-zsh = {
enable = true;
plugins = [
"git"
"command-not-found"
];
custom = "$HOME/code/dotfiles/oh-my-zsh";
theme = "matipan";
};
initExtra = ''
eval "$(direnv hook zsh)"
aws_stg() {
export AWS_PROFILE=stg
export AWS_REGION=us-east-1
}
aws_prod() {
export AWS_PROFILE=admin
export AWS_REGION=us-east-1
}
aws_prod_legacy() {
export AWS_PROFILE=admin
export AWS_REGION=sa-east-1
}
bindkey -s ^f "tmux-sessionizer\n"
'';
};
programs.tmux = {
enable = true;
clock24 = true;
escapeTime = 1;
historyLimit = 1000000;
resizeAmount = 5;
sensibleOnTop = true;
prefix = "C-b";
terminal = "xterm-256color";
plugins = with pkgs; [
tmuxPlugins.yank
{
plugin = tmuxPlugins.nord;
extraConfig = "set -g @nord_tmux_no_patched_font '1'";
}
];
extraConfig = ''
set -g mouse on
set -g escape-time 1
set-option -ga terminal-overrides ",xterm-256color:Tc"
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind o new-window -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind m resize-pane -Z
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind M split-window -h "nvim ~/.tmux.conf"
'';
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
# Manual stuff
manual.manpages.enable = false;
}