Skip to content

Commit

Permalink
2024/07/20-03:56:54
Browse files Browse the repository at this point in the history
  • Loading branch information
1nv0k32 committed Jul 20, 2024
1 parent 33d033a commit 542c970
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 93 deletions.
1 change: 1 addition & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
++ [
./sysconf.nix
./nvim.nix
./tmux.nix
./cert-der.nix
./alpaca.nix
];
Expand Down
82 changes: 40 additions & 42 deletions modules/nvim.nix
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
programs = {
nixvim = {
enable = true;
viAlias = true;
vimAlias = true;
colorschemes.vscode.enable = true;
opts = {
number = true;
relativenumber = true;
undofile = true;
encoding = "utf-8";
signcolumn = "yes";
belloff = "all";
wrap = false;
wildmenu = true;
modeline = true;
modelines = 1;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
expandtab = true;
smarttab = true;
autoindent = true;
};
clipboard = {
register = "unnamedplus";
providers.wl-copy.enable = true;
};
plugins = {
lightline.enable = true;
indent-blankline.enable = true;
lastplace.enable = true;
treesitter.enable = true;
treesitter-context.enable = true;
cmp.enable = true;
nvim-autopairs.enable = true;
lsp = {
enable = true;
servers = {
nixd.enable = true;
};
programs.nixvim = {
enable = true;
viAlias = true;
vimAlias = true;
colorschemes.vscode.enable = true;
opts = {
number = true;
relativenumber = true;
undofile = true;
encoding = "utf-8";
signcolumn = "yes";
belloff = "all";
wrap = false;
wildmenu = true;
modeline = true;
modelines = 1;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
expandtab = true;
smarttab = true;
autoindent = true;
};
clipboard = {
register = "unnamedplus";
providers.wl-copy.enable = true;
};
plugins = {
lightline.enable = true;
indent-blankline.enable = true;
lastplace.enable = true;
treesitter.enable = true;
treesitter-context.enable = true;
cmp.enable = true;
nvim-autopairs.enable = true;
lsp = {
enable = true;
servers = {
nixd.enable = true;
};
};
};
Expand Down
54 changes: 54 additions & 0 deletions modules/tmux.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib, pkgs, ... }:
{
programs.tmux = {
enable = true;
extraConfig = ''
bind -r C-a send-prefix
bind r source-file /etc/tmux.conf
bind - split-window -v -c '#{pane_current_path}'
bind \\ split-window -h -c '#{pane_current_path}'
bind _ split-window -vf -c '#{pane_current_path}'
bind | split-window -hf -c '#{pane_current_path}'
bind -r C-k resize-pane -U
bind -r C-j resize-pane -D
bind -r C-h resize-pane -L
bind -r C-l resize-pane -R
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe
bind -T copy-mode-vi Enter send-keys -X copy-pipe
set -g base-index 1
set -g mode-keys vi
set -g prefix C-a
set -g history-limit 50000
set -g set-titles on
set -g mouse on
set -g monitor-activity on
set -g default-terminal "screen-256color"
set -g default-command "''${SHELL}"
set -s set-clipboard external
set -g copy-command "${pkgs.wl-clipboard}/bin/wl-copy"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set -g status-interval 60
set -g status-bg black
set -g status-fg green
set -g window-status-activity-style fg=red
set -g status-left-length 100
set -g status-left '#{?client_prefix,#[fg=red]PFX, } #[fg=green](#S) '
set -g status-right-length 100
set -g status-right '#[fg=yellow]%Y/%m(%b)/%d %a %H:%M#[default]'
set -g pane-border-lines double
set -g clock-mode-style 24
set-environment -g COLORTERM "truecolor"
'';
};
}

# vim:expandtab ts=2 sw=2
4 changes: 0 additions & 4 deletions src/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ with lib;
};
ssh.extraConfig = customConfigs.SSH_CLIENT_CONFIG;
dconf.enable = mkDefault true;
tmux = {
enable = mkDefault true;
extraConfig = customConfigs.TMUX_CONFIG;
};
git = {
enable = mkDefault true;
config = {
Expand Down
47 changes: 0 additions & 47 deletions src/configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,53 +90,6 @@ with lib;
IdentitiesOnly yes
ServerAliveInterval 60
'';

TMUX_CONFIG = mkDefault ''
bind -r C-a send-prefix
bind r source-file /etc/tmux.conf
bind - split-window -v -c '#{pane_current_path}'
bind \\ split-window -h -c '#{pane_current_path}'
bind _ split-window -vf -c '#{pane_current_path}'
bind | split-window -hf -c '#{pane_current_path}'
bind -r C-k resize-pane -U
bind -r C-j resize-pane -D
bind -r C-h resize-pane -L
bind -r C-l resize-pane -R
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe
bind -T copy-mode-vi Enter send-keys -X copy-pipe
set -g base-index 1
set -g mode-keys vi
set -g prefix C-a
set -g history-limit 50000
set -g set-titles on
set -g mouse on
set -g monitor-activity on
set -g default-terminal "screen-256color"
set -g default-command "''${SHELL}"
set -s set-clipboard external
set -g copy-command "${pkgs.wl-clipboard}/bin/wl-copy"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set -g status-interval 60
set -g status-bg black
set -g status-fg green
set -g window-status-activity-style fg=red
set -g status-left-length 100
set -g status-left '#{?client_prefix,#[fg=red]PFX, } #[fg=green](#S) '
set -g status-right-length 100
set -g status-right '#[fg=yellow]%Y/%m(%b)/%d %a %H:%M#[default]'
set -g pane-border-lines double
set -g clock-mode-style 24
set-environment -g COLORTERM "truecolor"
'';
}

# vim:expandtab ts=2 sw=2

0 comments on commit 542c970

Please sign in to comment.