diff --git a/nix/home/desktop.nix b/nix/home/desktop.nix index 8d689bc..953b0a5 100644 --- a/nix/home/desktop.nix +++ b/nix/home/desktop.nix @@ -15,7 +15,7 @@ let gnomePkgs = with pkgs; [ gnomecast - gnome-tweaks + gnome.gnome-tweaks gnomeExtensions.worksets ]; in diff --git a/nix/home/programs/git/default.nix b/nix/home/programs/git/default.nix index f69e983..f4f9de1 100644 --- a/nix/home/programs/git/default.nix +++ b/nix/home/programs/git/default.nix @@ -18,12 +18,7 @@ in rebase = { updateRefs = true; }; - - init = { - defaultBranch = "main"; - }; }; - ignores = [ ".idea/" ".direnv/" diff --git a/nix/home/programs/nvim/default.nix b/nix/home/programs/nvim/default.nix index ef7cd36..f985d51 100644 --- a/nix/home/programs/nvim/default.nix +++ b/nix/home/programs/nvim/default.nix @@ -10,6 +10,38 @@ let }; }; + vim-catppuccino = pkgs.vimUtils.buildVimPlugin { + name = "vim-catppuccino"; + src = pkgs.fetchFromGitHub { + owner = "Pocco81"; + repo = "Catppuccino.nvim"; + rev = "014d8575acdd19ecef4ecb12fc82a2e21794b548"; + sha256 = "0i0p21jkrx99n3dnm5xvnw8n963c67l4lgl4iwngz0psdzwxphkw"; + }; + }; + + copilot-lua = pkgs.vimUtils.buildVimPlugin { + name = "copilot.lua"; + version = "2024-06-18"; + src = pkgs.fetchFromGitHub { + owner = "zbirenbaum"; + repo = "copilot.lua"; + rev = "86537b286f18783f8b67bccd78a4ef4345679625"; + sha256 = "sha256-HC1QZlqEg+RBz/8kjLadafc06UoMAjhh0UO/BWQGMY8="; + }; + }; + + copilot-cmp = pkgs.vimUtils.buildVimPlugin { + name = "copilot-cmp"; + version = "2024-06-18"; + src = pkgs.fetchFromGitHub { + owner = "zbirenbaum"; + repo = "copilot-cmp"; + rev = "c2cdb3c0f5078b0619055af192295830a7987790"; + sha256 = "sha256-+MzEGnhlrYRvAfskOwmw69OC1CsPXt7s3z+xPe9XPqs="; + }; + }; + vim-precognition = pkgs.vimUtils.buildVimPlugin { name = "vim-precognition"; version = "2024-05-26"; @@ -29,9 +61,8 @@ with builtins; plugins = with pkgs.vimPlugins; [ vim-sensible vim-startify - catppuccin-nvim + vim-catppuccino vim-precognition - nvim-treesitter.withAllGrammars { plugin = fzf-vim; @@ -144,6 +175,29 @@ with builtins; nnoremap fh lua require('telescope.builtin').help_tags() ''; } + { + plugin = copilot-lua; + config = '' + lua << EOF + vim.defer_fn(function() + require('copilot').setup({ + -- Disable these features because we're also using copilot-cmp + suggestion = { enabled = false }, + panel = { enabled = false }, + copilot_node_command = '${pkgs.nodejs-18_x}/bin/node', + }) + end, 100) + EOF + ''; + } + { + plugin = copilot-cmp; + config = '' + lua << EOF + require('copilot_cmp').setup({}) + EOF + ''; + } # have the completion plugin get loaded last just in case anything above # needs to do setup work before completions get set up. { diff --git a/nix/home/programs/nvim/init.vim b/nix/home/programs/nvim/init.vim index 854bfd8..180b758 100644 --- a/nix/home/programs/nvim/init.vim +++ b/nix/home/programs/nvim/init.vim @@ -10,7 +10,7 @@ set pastetoggle= set nowrap set background=dark -colorscheme catppuccin +colorscheme catppuccino set nocompatible set number relativenumber @@ -86,11 +86,3 @@ set scrolloff=10 if filereadable($HOME . "/.vimrc.local") source ~/.vimrc.local endif - -lua << EOF -require'nvim-treesitter.configs'.setup { - highlight = { - enable = true, - }, - } -EOF diff --git a/nix/home/programs/nvim/nvim-lspconfig.lua b/nix/home/programs/nvim/nvim-lspconfig.lua index 337bac1..3271c34 100644 --- a/nix/home/programs/nvim/nvim-lspconfig.lua +++ b/nix/home/programs/nvim/nvim-lspconfig.lua @@ -149,7 +149,7 @@ capabilitiesWithoutFomatting.textDocument.formatting = false capabilitiesWithoutFomatting.textDocument.rangeFormatting = false capabilitiesWithoutFomatting.textDocument.range_formatting = false -nvim_lsp.ts_ls.setup { +nvim_lsp.tsserver.setup { init_options = { hostInfo = "neovim", maxTsServerMemory = "8192", @@ -181,5 +181,3 @@ nvim_lsp.lua_ls.setup { } nvim_lsp.texlab.setup {} - -nvim_lsp.gleam.setup {} diff --git a/nix/home/programs/tmux/default.nix b/nix/home/programs/tmux/default.nix index fad9843..63a195d 100644 --- a/nix/home/programs/tmux/default.nix +++ b/nix/home/programs/tmux/default.nix @@ -1,19 +1,14 @@ -{ ... }: +{ pkgs, ... }: { programs.tmux = { enable = true; tmuxinator = { enable = true; }; - - terminal = "screen-256color"; - aggressiveResize = true; secureSocket = false; - baseIndex = 1; - historyLimit = 10000; - escapeTime = 500; - mouse = true; + }; - extraConfig = builtins.readFile ./tmux.conf; + home.file.".tmux.conf" = { + source = ./tmux.conf; }; } diff --git a/nix/home/programs/tmux/tmux.conf b/nix/home/programs/tmux/tmux.conf index a249a5e..1da5299 100644 --- a/nix/home/programs/tmux/tmux.conf +++ b/nix/home/programs/tmux/tmux.conf @@ -1,3 +1,20 @@ +# reload tmux conf +unbind r +bind r source-file ~/.tmux.conf + +bind-key C-a last-window + +setw -g aggressive-resize on + +# faster escape recognition +set-option -sg escape-time 50 + +# number tabs starting at 1 +set-option -g base-index 1 + +set-option -g default-terminal screen-256color + +# STATUS BAR set-option -g status-bg colour234 # light gray bg set-option -g status-fg colour255 # black text @@ -7,12 +24,17 @@ setw -g window-status-current-format "#[fg=white,bold]#[bg=cyan][#I:#W]" set-option -g set-titles on set-option -g set-titles-string '[#S:#I #H] #W' +# mouse mode +set -g mouse on + # clipboard set -g set-clipboard off -bind-key C-a last-window - -# https://github.com/tmux/tmux/issues/4240 and https://github.com/LnL7/nix-darwin/issues/1181 -set -gu default-command -set-option -g default-shell "$SHELL" +# big scrollback +set-option -g history-limit 10240 +# smart pane switching with awareness of vim splits +bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L" +bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D" +bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U" +bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" diff --git a/nix/system/framework/configuration.nix b/nix/system/framework/configuration.nix index e35ce48..7ab723f 100644 --- a/nix/system/framework/configuration.nix +++ b/nix/system/framework/configuration.nix @@ -139,7 +139,7 @@ services.gnome.gnome-remote-desktop.enable = false; # Enable touchpad support. - services.libinput.enable = true; + services.xserver.libinput.enable = true; services.xserver = { # Enable the X11 windowing system. diff --git a/nix/system/framework/hardware-configuration.nix b/nix/system/framework/hardware-configuration.nix index f402a94..fddb639 100644 --- a/nix/system/framework/hardware-configuration.nix +++ b/nix/system/framework/hardware-configuration.nix @@ -35,9 +35,5 @@ swapDevices = [{ device = "/dev/disk/by-uuid/97c769a2-55da-475a-8dc0-d74d8bbde514"; }]; - powerManagement= { - enable = true; - cpuFreqGovernor = lib.mkDefault "powersave"; - powertop.enable = true; - }; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; } diff --git a/nix/system/worktop/darwin-configuration.nix b/nix/system/worktop/darwin-configuration.nix index 4de61c8..2dc11c8 100644 --- a/nix/system/worktop/darwin-configuration.nix +++ b/nix/system/worktop/darwin-configuration.nix @@ -74,7 +74,6 @@ in pkgs.syncthing pkgs.slack pkgs._1password - # pkgs._1password-gui pkgs.tailscale whatsapp obs-studio diff --git a/nix/system/xps11/configuration.nix b/nix/system/xps11/configuration.nix index e274c57..9edc143 100644 --- a/nix/system/xps11/configuration.nix +++ b/nix/system/xps11/configuration.nix @@ -91,9 +91,6 @@ services.xserver.layout = "us"; - # xps11 is primarly used as a "server" - services.logind.lidSwitch = "ignore"; - nixpkgs.config.packageOverrides = pkgs: { vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; }; diff --git a/secrets b/secrets index fecfe5a..2ad6435 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit fecfe5a04ea935f130173fc32a23c2e2a94a77d4 +Subproject commit 2ad64358ccb89ceb63d8c3815462af6590590462