diff --git a/readme.md b/readme.md index bfe9b7a..38cabc7 100644 --- a/readme.md +++ b/readme.md @@ -30,6 +30,8 @@ - copy over this systems ssh public key ( /etc/shh/*ed25519* ) into the ./secrets/secrets.nix file - push those up, using another computer re-key all the secrets, push up again - pull new secrets down with new added keys and rebuild +- clone neovim setup... + # Later updates - `nix flake update /etc/nixos` diff --git a/systems/_common/configuration.nix b/systems/_common/configuration.nix index 1a651b8..f01a5f0 100644 --- a/systems/_common/configuration.nix +++ b/systems/_common/configuration.nix @@ -48,6 +48,8 @@ in # Some basics nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ + # wayland clipboard in terminal + wl-clipboard # Basics neovim vim diff --git a/systems/joe/configuration.nix b/systems/joe/configuration.nix index c1b1168..10e9cdd 100644 --- a/systems/joe/configuration.nix +++ b/systems/joe/configuration.nix @@ -57,6 +57,7 @@ services.xserver.displayManager.gdm = { enable = true; autoSuspend = false; + wayland = true; }; services.xserver.desktopManager.gnome.enable = true; services.gnome.core-utilities.enable = false; @@ -78,4 +79,48 @@ environment.shellAliases = { wifi = "nmtui"; }; + + + # nvidia gfx + # ========= + # Enable OpenGL + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + + # Load nvidia driver for Xorg and Wayland + services.xserver.videoDrivers = ["nvidia"]; + hardware.nvidia = { + + # Modesetting is required. + modesetting.enable = true; + + # Nvidia power management. Experimental, and can cause sleep/suspend to fail. + # Enable this if you have graphical corruption issues or application crashes after waking + # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead + # of just the bare essentials. + powerManagement.enable = false; + + # Fine-grained power management. Turns off GPU when not in use. + # Experimental and only works on modern Nvidia GPUs (Turing or newer). + powerManagement.finegrained = false; + + # Use the NVidia open source kernel module (not to be confused with the + # independent third-party "nouveau" open source driver). + # Support is limited to the Turing and later architectures. Full list of + # supported GPUs is at: + # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # Only available from driver 515.43.04+ + # Currently alpha-quality/buggy, so false is currently the recommended setting. + open = false; + + # Enable the Nvidia settings menu, + # accessible via `nvidia-settings`. + nvidiaSettings = true; + + # Optionally, you may need to select the appropriate driver version for your specific GPU. + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; } diff --git a/users/josh/programs/alacritty.nix b/users/josh/programs/alacritty.nix new file mode 100644 index 0000000..f1c44d4 --- /dev/null +++ b/users/josh/programs/alacritty.nix @@ -0,0 +1,51 @@ +{ ... }: +{ + # More of an experiment to try out since wezterm is being weird on wayland... + # + # + programs.alacritty = { + enable = true; + settings = { + window = { + decorations = "None"; + dynamic_title = false; + }; + colors = { + primary = { + foreground = "#e0e0e0"; + background = "#262626"; + cursor = "#171717"; + vi_mode_cursor = "#636363"; + }; + normal = { + # Catppuccin Coal + black = "#1f1f1f"; + red = "#f38ba8"; + green = "#a6e3a1"; + yellow = "#f9e2af"; + blue = "#89b4fa"; + magenta = "#cba6f7"; + cyan = "#89dceb"; + white = "#e0e0e0"; + }; + }; + font = { + normal = { family = "JetBrainsMonoNL Nerd Font"; style = "Regular"; }; + size = 12.0; + ## TODO use 16 on macos ... + }; + # TODO revisit... none of this is working. + keyboard.bindings = [ + # { key = "m"; mods = "Command"; chars = "test"; } + # { key = "t"; mods = "Control"; action = { SendString = "\\x01t"; }; } + # { key = "w"; mods = "Control"; action = { SendString = "\\x01w"; }; } + # { key = "o"; mods = "Control"; action = { SendString = "testing123"; }; } + # { key = "w"; mods = "Control"; chars = "\\\\x01w"; } + # { key = "o"; mods = "Control"; chars = "\\\\x01o"; } + # { key = "1"; mods = "Control"; chars = "\\\\x011"; } + # { key = "2"; mods = "Control"; chars = "\\\\x012"; } + ]; + }; + }; +} + diff --git a/users/josh/programs/tmux/tmux-reset.conf b/users/josh/programs/tmux/tmux-reset.conf index cec9c49..204af4b 100644 --- a/users/josh/programs/tmux/tmux-reset.conf +++ b/users/josh/programs/tmux/tmux-reset.conf @@ -1,9 +1,17 @@ # Reset everything then add what we want exactly unbind-key -a +bind C-Space send-prefix -# Window stuff -bind -r H previous-window -bind -r L next-window +# Windows +bind -r p previous-window +bind -r n next-window +bind -r & kill-window +bind -r c new-window +bind ',' command-prompt "rename-window %%" +bind -r '"' split-window -v -c "#{pane_current_path}" +bind -r % split-window -h -c "#{pane_current_path}" +# bind "'" command-prompt -T window-target -p index { select-window it ":%%" } +bind w choose-tree -Zw bind -r 1 select-window -t:1 bind -r 2 select-window -t:2 bind -r 3 select-window -t:3 @@ -13,41 +21,38 @@ bind -r 6 select-window -t:6 bind -r 7 select-window -t:7 bind -r 8 select-window -t:8 bind -r 9 select-window -t:9 -bind r command-prompt "rename-window %%" -bind | split-window -h -c "#{pane_current_path}" -bind \\ split-window -v -c "#{pane_current_path}" -bind t new-window -bind T command-prompt -p "window name:" "new-window; rename-window '%%'" +# custom bind m command-prompt -p "Swap with window index:" "swap-window -t '%%'" bind -r [ swap-window -t -1 \; previous-window bind -r ] swap-window -t +1 \; next-window -# Sessions -bind C-s command-prompt -p "session name:" "new-session -s '%%'" -bind C-r command-prompt "rename-session %%" -bind -r C-L switch-client -n -bind -r C-H switch-client -p -# Pane stuff +# Panes +bind ! break-pane +bind -r left select-pane -L +bind -r down select-pane -D +bind -r up select-pane -U +bind -r right select-pane -R +bind -r x kill-pane +bind z resize-pane -Z +# custom +bind e select-layout tiled bind -r h select-pane -L bind -r j select-pane -D bind -r k select-pane -U bind -r l select-pane -R -bind -r , resize-pane -L 20 -bind -r . resize-pane -R 20 -bind -r - resize-pane -D 7 -bind -r = resize-pane -U 7 -bind q kill-pane -bind w kill-window -bind x swap-pane -D + + +# Sessions +bind $ command-prompt "rename-session %%" +bind -r ) switch-client -n +bind -r ( switch-client -p + # Tmux util -bind p paste-buffer bind X source-file ~/.config/tmux/tmux.conf -bind z resize-pane -Z bind : command-prompt -bind ^Q detach - +bind C-D detach # ========== # My options set-option -g terminal-overrides ',xterm-256color:RGB' diff --git a/users/josh/programs/tmux/tmux.nix b/users/josh/programs/tmux/tmux.nix index 29b1859..8dcb8ae 100644 --- a/users/josh/programs/tmux/tmux.nix +++ b/users/josh/programs/tmux/tmux.nix @@ -12,8 +12,9 @@ in # Revisit this later, permission denied to make anything in `/run` as my user... secureSocket = false; - shortcut = "a"; - prefix = "C-a"; + # default is B switch to space for easier dual hand use + shortcut = "Space"; + prefix = "C-Space"; baseIndex = 1; mouse = true; keyMode = "vi"; @@ -23,24 +24,15 @@ in aggressiveResize = true; plugins = [ - { - plugin = tmux.sessionist; - extraConfig = '' - set -g @sessionist-join-pane "j" - set -g @sessionist-goto "o" - - set -g @default_key_bindings_new "UNSET" - ''; - } tmux.yank - tmux.tmux-thumbs - { - plugin = tmux.fzf-tmux-url; - extraConfig = '' - set -g @fzf-url-fzf-options '-p 60%,30% --prompt = " " - -border-label=" Open URL "' - set -g @fzf-url-history-limit '2000' - ''; - } + # tmux.tmux-thumbs + # { + # plugin = tmux.fzf-tmux-url; + # extraConfig = '' + # set -g @fzf-url-fzf-options '-p 60%,30% --prompt = " " - -border-label=" Open URL "' + # set -g @fzf-url-history-limit '2000' + # ''; + # } { plugin = tmux.catppuccin.overrideAttrs (_: { src = pkgs.fetchFromGitHub { diff --git a/users/josh/programs/wezterm/wezterm.lua b/users/josh/programs/wezterm/wezterm.lua index 00909d9..7ade97c 100644 --- a/users/josh/programs/wezterm/wezterm.lua +++ b/users/josh/programs/wezterm/wezterm.lua @@ -106,6 +106,8 @@ if isMac then config.font_size = 16 config.window_decorations = "RESIZE" elseif isNix then + config.enable_wayland = true + config.window_decorations = "NONE" -- Fix for cursor disappearing in gnome