summaryrefslogtreecommitdiffstats
path: root/modules/desktop
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-04-26 12:48:36 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-04-26 12:48:36 -0400
commit7e1c5f4418a629d6f3bae954dd172ca81e476b3e (patch)
treed0806f2925ff0574e26fa22a7ff073036a2a0d9a /modules/desktop
parent7b79203f54853733d4fae88943829d0e24e6e49f (diff)
downloadnix-config-7e1c5f4418a629d6f3bae954dd172ca81e476b3e.tar.gz
nix-config-7e1c5f4418a629d6f3bae954dd172ca81e476b3e.tar.bz2
nix-config-7e1c5f4418a629d6f3bae954dd172ca81e476b3e.zip
update laptop config
Diffstat (limited to 'modules/desktop')
-rw-r--r--modules/desktop/apps/editors/neovim.nix41
-rw-r--r--modules/desktop/apps/tmux.nix55
2 files changed, 90 insertions, 6 deletions
diff --git a/modules/desktop/apps/editors/neovim.nix b/modules/desktop/apps/editors/neovim.nix
index 77857a2..ee6424b 100644
--- a/modules/desktop/apps/editors/neovim.nix
+++ b/modules/desktop/apps/editors/neovim.nix
@@ -16,11 +16,6 @@ in {
};
config = lib.mkIf (nvimConf.enable) {
-
- home.manager.xdg.configFile."nvim/init.vim".source = "${configDir}/nvim/init.vim";
- home.manager.xdg.configFile."nvim/lua/init.lua".source = "${configDir}/nvim/init.lua";
- home.manager.xdg.configFile."nvim/lua/plugins.lua".source = "${configDir}/nvim/plugins.lua";
-
modules.desktop.defaultApplications.apps.editor = rec {
package = pkgs.neovim;
install = false;
@@ -29,7 +24,11 @@ in {
};
home.packages = [
-
+ pkgs.rnix-lsp
+ pkgs.ccls
+ pkgs.nodePackages.bash-language-server
+ pkgs.texlab
+ pkgs.sumneko-lua-language-server
];
home.manager.programs.neovim = {
@@ -37,6 +36,36 @@ in {
viAlias = true;
vimAlias = true;
withNodeJs = true;
+
+ extraConfig = ''
+ luafile /etc/nixos/config/nvim/lua/settings.lua
+ luafile /etc/nixos/config/nvim/lua/lsp.lua
+ '';
+
+ plugins = with pkgs.vimPlugins; [
+ nvim-web-devicons
+ gitsigns-nvim
+ nvim-tree-lua
+ catppuccin-nvim
+
+ nvim-lspconfig
+ nvim-cmp
+ cmp-cmdline
+ cmp-nvim-lsp
+ cmp-buffer
+ cmp-path
+ cmp-vsnip
+ cmp-treesitter
+
+ vim-nix
+ vim-vsnip
+ nvim-treesitter.withAllGrammars
+ neoformat
+
+ bufferline-nvim
+ lualine-nvim
+ alpha-nvim
+ ];
};
};
}
diff --git a/modules/desktop/apps/tmux.nix b/modules/desktop/apps/tmux.nix
new file mode 100644
index 0000000..6b58d8d
--- /dev/null
+++ b/modules/desktop/apps/tmux.nix
@@ -0,0 +1,55 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ tmuxConf = config.modules.desktop.apps.tmux;
+in {
+ options.modules.desktop.apps.tmux = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ };
+ };
+
+ config = lib.mkIf (tmuxConf.enable) {
+ home.manager.programs.tmux = {
+ enable = true;
+ terminal = "tmux-256color";
+ historyLimit = 10000;
+ plugins = with pkgs.tmuxPlugins;
+ [
+ catppuccin
+ vim-tmux-navigator
+ sensible
+ yank
+ ];
+ shell = "${pkgs.zsh}/bin/zsh";
+ extraConfig = ''
+set-option -sa terminal-overrides ",xterm*:Tc"
+set -g mouse on
+
+unbind C-b
+set -g prefix C-Space
+bind C-Space send-prefix
+
+bind -n M-H previous-window
+bind -n M-L next-window
+
+set -g base-index 1
+set -g pane-base-index 1
+set-window-option -g pane-base-index 1
+set-option -g renumber-windows on
+
+bind-key -T copy-mode-vi v send-keys -X begin-selection
+bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
+bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
+
+bind '"' split-window -v -c ''${pane_current_path}"
+bind % split-window -h -c ''${pane_current_path}"
+ '';
+ };
+ };
+}