-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from himkt/nix-modularized
misc(nix): make some configs nix modules
- Loading branch information
Showing
13 changed files
with
143 additions
and
143 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ ... }: | ||
|
||
{ | ||
programs.git = { | ||
enable = true; | ||
aliases = { | ||
remove-merged = "!remove-merged-branches"; | ||
}; | ||
|
||
userEmail = "[email protected]"; | ||
userName = "himkt"; | ||
|
||
ignores = [ | ||
".vim" | ||
".vscode" | ||
".rakeTasks" | ||
".rubocop.yml" | ||
".venv" | ||
"*.egg-info" | ||
".mypy_cache" | ||
".idea" | ||
".DS_Store" | ||
]; | ||
|
||
lfs = { | ||
enable = true; | ||
}; | ||
|
||
extraConfig = { | ||
format = { | ||
pretty = "format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]"; | ||
date = "iso"; | ||
}; | ||
pull = { | ||
rebase = false; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ ... }: | ||
|
||
{ | ||
programs.tmux = { | ||
enable = true; | ||
|
||
extraConfig = '' | ||
unbind C-b | ||
# default config | ||
set -g status-interval 2 | ||
set -g default-terminal "screen-256color" | ||
set -g status-justify left | ||
# enable mouse mode | ||
setw -g mode-keys vi | ||
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel\; run "tmux save -|pbcopy" | ||
bind-key -T copy-mode-vi Enter send -X copy-selection-and-cancel\; run "tmux save -|pbcopy" | ||
# color | ||
set -g status-fg colour231 | ||
set -g status-bg colour234 | ||
# window | ||
window_status_current_format1="#[fg=colour234,bg=colour31] #[fg=colour117,bg=colour31]" | ||
window_status_current_format2="#I #[fg=colour231]#W #[fg=colour31,bg=colour234,nobold]" | ||
window_status_current_format=$window_status_current_format1' '$window_status_current_format2 | ||
set -g window-status-format "#[fg=colour244,bg=colour234] #I #[fg=colour240] #[default]#W" | ||
set -g window-status-current-format $window_status_current_format | ||
# take over current directory path | ||
bind-key '"' split-window -c "#{pane_current_path}" | ||
bind-key % split-window -h -c "#{pane_current_path}" | ||
bind-key c new-window -c "#{pane_current_path}" | ||
# status bar | ||
set -g status-left-length 20 | ||
status_left1="#{?client_prefix,#[fg=colour254]#[bg=colour31],#[fg=colour16]#[bg=colour254]}" | ||
status_left2="#S #{?client_prefix,#[fg=colour31]#[bg=colour234]#[nobold],#[fg=colour254]#[bg=colour234]#[nobold]}" | ||
set -qg status-left $status_left1' '$status_left2 | ||
set -qg status-right '%H:%M #[fg=colour16,bg=colour254]' | ||
# tmux config | ||
set -g escape-time 10 | ||
set -g history-limit 50000 | ||
bind ^h select-layout even-horizontal | ||
bind ^v select-layout even-vertical | ||
# NOTE Commands `search-xxx-incremental` is new feature, it counldn't use in some environments | ||
# For old tmux, please comment out following statement | ||
bind-key -T copy-mode-vi / command-prompt -i -I "#{pane_search_string}" -p "(search down)" "send -X search-forward-incremental \"%%%\"" | ||
bind-key -T copy-mode-vi ? command-prompt -i -I "#{pane_search_string}" -p "(search up)" "send -X search-backward-incremental \"%%%\"" | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ ... }: | ||
|
||
{ | ||
programs.wezterm = { | ||
enable = true; | ||
|
||
extraConfig = '' | ||
local wezterm = require 'wezterm' | ||
local config = {} | ||
config.keys = {} | ||
config.scrollback_lines = 9999999 | ||
-- Use the defaults as a base | ||
config.hyperlink_rules = wezterm.default_hyperlink_rules() | ||
-- Font | ||
config.font = wezterm.font 'JetBrains Mono NL' | ||
config.font_size = 16.0 | ||
-- https://wezfurlong.org/wezterm/colorschemes/g/index.html | ||
config.color_scheme = 'Guezwhoz' | ||
config.colors = {cursor_bg = 'cyan', cursor_fg = 'black'} | ||
config.default_cursor_style = 'SteadyUnderline' | ||
config.window_background_opacity = 0.8 | ||
-- skip confirmation prompt when quitting app | ||
config.window_close_confirmation = 'NeverPrompt' | ||
-- fullscreen shortcut | ||
config.native_macos_fullscreen_mode = true | ||
config.keys[1] = { | ||
key = 'f', | ||
mods = 'CMD|CTRL', | ||
action = wezterm.action.ToggleFullScreen, | ||
} | ||
config.keys[2] = { | ||
key = 'Enter', | ||
mods = 'CMD', | ||
action = wezterm.action.ToggleFullScreen, | ||
} | ||
return config | ||
''; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.