forked from nbelakovski/configs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.nix
103 lines (95 loc) · 3.02 KB
/
common.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
{ config, pkgs, ... }:
let
unstablePkgs = import <nixpkgs-unstable> {};
in
{
nixpkgs = {
config = {
allowUnfree = true;
};
};
home.packages = [
pkgs.fd
pkgs.eza
pkgs.cmake
pkgs.ninja
pkgs.tree
pkgs.wget
pkgs.nmap
pkgs.unrar
pkgs.watch
pkgs.bash-completion
pkgs.bashInteractive
pkgs.bash-preexec # I think this one is necessary for atuin?
pkgs.nix-bash-completions
# vim-full appears to work fine on Darwin, but it appears that
# vim-darwin is compiled with some sort of special support for Darwin so
# let's use that.
(if pkgs.stdenv.isDarwin then pkgs.vim-darwin else pkgs.vim-full)
];
programs.atuin = {
enable = true;
package = unstablePkgs.atuin;
};
programs.git = {
enable = true;
package = pkgs.gitFull;
userName = "Nickolai Belakovski";
aliases = {
br = "branch";
ci = "commit";
co = "checkout";
st = "status";
wt = "worktree";
};
extraConfig = {
push = { default = "current"; };
};
};
programs.tmux = {
enable = true;
sensibleOnTop = false;
baseIndex = 1;
prefix = "C-s";
mouse = true;
terminal = "xterm-256color"; # vim colorschemes are a little weird with 'screen'
escapeTime = 0; # prevents delay between insert and command mode in vim
plugins = with pkgs; [
{
plugin = tmuxPlugins.dracula;
extraConfig = ''
set -g @dracula-plugins "git battery ram-usage spotify-tui weather time network-ping"
set -g @dracula-battery-label "🔋"
set -g @dracula-show-empty-plugins false
set -g @dracula-ram-usage-label "🐏"
set -g @dracula-show-left-icon session
set -g @dracula-refresh-rate 1
set -g @dracula-border-contrast true
set -g @dracula-git-show-diff-symbol " "
set -g @dracula-git-no-untracked-files true
set -g @dracula-spotify-tui-format "|%s |%t"
set -g @dracula-ping-server "lepotato.local"
set -g @dracula-ping-rate 5
'';
}
];
extraConfig = ''
unbind r
bind r source-file ~/.config/tmux/tmux.conf \; display-message "~/.config/tmux/tmux.conf reloaded."
# Set to scroll one line per scroll
# Source: https://stackoverflow.com/questions/36002866/configure-tmux-scroll-speed
bind-key -T copy-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X scroll-down
# Set new panes and windows to open in the current path
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
# Increase default display time for messages
set -g display-time 1500
'';
};
home.file = {
".vimrc".source = config.lib.file.mkOutOfStoreSymlink ./.vimrc;
".shell_settings.sh".source = config.lib.file.mkOutOfStoreSymlink ./.shell_settings.sh;
};
}