diff --git a/nix/home/desktop.nix b/nix/home/desktop.nix index 953b0a5..8d689bc 100644 --- a/nix/home/desktop.nix +++ b/nix/home/desktop.nix @@ -15,7 +15,7 @@ let gnomePkgs = with pkgs; [ gnomecast - gnome.gnome-tweaks + gnome-tweaks gnomeExtensions.worksets ]; in diff --git a/nix/home/programs/git/default.nix b/nix/home/programs/git/default.nix index f4f9de1..f69e983 100644 --- a/nix/home/programs/git/default.nix +++ b/nix/home/programs/git/default.nix @@ -18,7 +18,12 @@ 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 f985d51..ef7cd36 100644 --- a/nix/home/programs/nvim/default.nix +++ b/nix/home/programs/nvim/default.nix @@ -10,38 +10,6 @@ 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"; @@ -61,8 +29,9 @@ with builtins; plugins = with pkgs.vimPlugins; [ vim-sensible vim-startify - vim-catppuccino + catppuccin-nvim vim-precognition + nvim-treesitter.withAllGrammars { plugin = fzf-vim; @@ -175,29 +144,6 @@ 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 180b758..854bfd8 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 catppuccino +colorscheme catppuccin set nocompatible set number relativenumber @@ -86,3 +86,11 @@ 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 3271c34..337bac1 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.tsserver.setup { +nvim_lsp.ts_ls.setup { init_options = { hostInfo = "neovim", maxTsServerMemory = "8192", @@ -181,3 +181,5 @@ 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 63a195d..fad9843 100644 --- a/nix/home/programs/tmux/default.nix +++ b/nix/home/programs/tmux/default.nix @@ -1,14 +1,19 @@ -{ pkgs, ... }: +{ ... }: { programs.tmux = { enable = true; tmuxinator = { enable = true; }; - secureSocket = false; - }; - home.file.".tmux.conf" = { - source = ./tmux.conf; + terminal = "screen-256color"; + aggressiveResize = true; + secureSocket = false; + baseIndex = 1; + historyLimit = 10000; + escapeTime = 500; + mouse = true; + + extraConfig = builtins.readFile ./tmux.conf; }; } diff --git a/nix/home/programs/tmux/tmux.conf b/nix/home/programs/tmux/tmux.conf index 1da5299..a249a5e 100644 --- a/nix/home/programs/tmux/tmux.conf +++ b/nix/home/programs/tmux/tmux.conf @@ -1,20 +1,3 @@ -# 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 @@ -24,17 +7,12 @@ 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 -# big scrollback -set-option -g history-limit 10240 +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" -# 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 7ab723f..e35ce48 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.xserver.libinput.enable = true; + services.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 fddb639..f402a94 100644 --- a/nix/system/framework/hardware-configuration.nix +++ b/nix/system/framework/hardware-configuration.nix @@ -35,5 +35,9 @@ swapDevices = [{ device = "/dev/disk/by-uuid/97c769a2-55da-475a-8dc0-d74d8bbde514"; }]; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + powerManagement= { + enable = true; + cpuFreqGovernor = lib.mkDefault "powersave"; + powertop.enable = true; + }; } diff --git a/nix/system/worktop/darwin-configuration.nix b/nix/system/worktop/darwin-configuration.nix index 2dc11c8..4de61c8 100644 --- a/nix/system/worktop/darwin-configuration.nix +++ b/nix/system/worktop/darwin-configuration.nix @@ -74,6 +74,7 @@ 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 9edc143..e274c57 100644 --- a/nix/system/xps11/configuration.nix +++ b/nix/system/xps11/configuration.nix @@ -91,6 +91,9 @@ 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 2ad6435..fecfe5a 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit 2ad64358ccb89ceb63d8c3815462af6590590462 +Subproject commit fecfe5a04ea935f130173fc32a23c2e2a94a77d4