From a2f99568249151b5a8668e3b785af075f3fc79ac Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Thu, 24 Apr 2025 13:54:05 -0700 Subject: [PATCH] [vega] Update config; make gui config generic. [nvim] Use Snacks smart finder instead of fzf and avoid race condition --- .../neovim/config/lua/plugins/fzf.lua | 1 + .../neovim/config/lua/plugins/snacks.lua | 13 +++++++++ .../neovim/config/lua/plugins/telescope.lua | 1 + system/features/gui.nix | 29 +++++++++++++++++++ system/hosts/altair/configuration.nix | 28 ------------------ system/hosts/altair/default.nix | 1 + system/hosts/vega/configuration.nix | 26 ----------------- system/hosts/vega/default.nix | 1 + 8 files changed, 46 insertions(+), 54 deletions(-) create mode 100644 home-manager/features/neovim/config/lua/plugins/snacks.lua create mode 100644 system/features/gui.nix diff --git a/home-manager/features/neovim/config/lua/plugins/fzf.lua b/home-manager/features/neovim/config/lua/plugins/fzf.lua index 01eaa06..79c7fa9 100644 --- a/home-manager/features/neovim/config/lua/plugins/fzf.lua +++ b/home-manager/features/neovim/config/lua/plugins/fzf.lua @@ -1,6 +1,7 @@ return { -- https://www.lazyvim.org/extras/editor/fzf "ibhagwan/fzf-lua", + enabled = false, keys = { { "", diff --git a/home-manager/features/neovim/config/lua/plugins/snacks.lua b/home-manager/features/neovim/config/lua/plugins/snacks.lua new file mode 100644 index 0000000..9e53ae1 --- /dev/null +++ b/home-manager/features/neovim/config/lua/plugins/snacks.lua @@ -0,0 +1,13 @@ +return { + "folke/snacks.nvim", + ---@type snacks.Config + keys = { + { + "", + function() + Snacks.picker.smart() + end, + desc = "Smart Find Files", + }, + }, +} diff --git a/home-manager/features/neovim/config/lua/plugins/telescope.lua b/home-manager/features/neovim/config/lua/plugins/telescope.lua index 95dac01..d31cb7c 100644 --- a/home-manager/features/neovim/config/lua/plugins/telescope.lua +++ b/home-manager/features/neovim/config/lua/plugins/telescope.lua @@ -1,3 +1,4 @@ +-- This is disabled because both snacks and fzf do a better job. return { "nvim-telescope/telescope.nvim", enabled = false, diff --git a/system/features/gui.nix b/system/features/gui.nix new file mode 100644 index 0000000..3457482 --- /dev/null +++ b/system/features/gui.nix @@ -0,0 +1,29 @@ +{ ... }: { + # Enable the X11 windowing system and a display manager + services.xserver = { + enable = true; + displayManager.gdm = { + enable = true; + wayland = true; + }; + # displayManager.sddm = { + # enable = true; + # wayland.enable = true; + # }; + + # Configure keymap in X11 + xkb = { + layout = "us"; + variant = ""; + }; + }; + # services.displayManager.ly.enable = true; + + # Enable Hyprland so it shows up in the menu + programs.hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + }; + +} diff --git a/system/hosts/altair/configuration.nix b/system/hosts/altair/configuration.nix index 37ecefc..2ee3f8a 100644 --- a/system/hosts/altair/configuration.nix +++ b/system/hosts/altair/configuration.nix @@ -4,7 +4,6 @@ { pkgs, - inputs, ... }: @@ -57,33 +56,6 @@ ''; }; - # Enable the X11 windowing system and a display manager - services.xserver = { - enable = true; - displayManager.gdm = { - enable = true; - wayland = true; - }; - # displayManager.sddm = { - # enable = true; - # wayland.enable = true; - # }; - }; - # services.displayManager.ly.enable = true; - - # Enable Hyprland so it shows up in the menu - programs.hyprland = { - enable = true; - withUWSM = true; - xwayland.enable = true; - }; - - # Configure keymap in X11 - services.xserver.xkb = { - layout = "us"; - variant = ""; - }; - # Enable CUPS to print documents. services.printing = { enable = true; diff --git a/system/hosts/altair/default.nix b/system/hosts/altair/default.nix index 8c85e74..c908a19 100644 --- a/system/hosts/altair/default.nix +++ b/system/hosts/altair/default.nix @@ -4,6 +4,7 @@ ./configuration.nix ./hardware-configuration.nix ../../authorized-keys.nix + ../../features/gui.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/system/hosts/vega/configuration.nix b/system/hosts/vega/configuration.nix index 6d72abd..46cb51c 100644 --- a/system/hosts/vega/configuration.nix +++ b/system/hosts/vega/configuration.nix @@ -4,7 +4,6 @@ { pkgs, - inputs, ... }: @@ -38,16 +37,6 @@ LC_TIME = "en_US.UTF-8"; }; - # Enable the X11 windowing system. - # You can disable this if you're only using the Wayland session. - services.xserver.enable = true; - - services.displayManager.sddm = { - enable = true; - - theme = "sddm-astronaut-theme"; - }; - # Unlock the default keyring on login to hyprland security.pam.services.hyprland.enableGnomeKeyring = true; @@ -59,21 +48,6 @@ ''; }; - # Enable Hyprland so it shows up in the menu - programs.hyprland = { - enable = true; - withUWSM = true; - package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; - portalPackage = - inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; - }; - - # Configure keymap in X11 - services.xserver.xkb = { - layout = "us"; - variant = ""; - }; - # Enable CUPS to print documents. services.printing = { enable = true; diff --git a/system/hosts/vega/default.nix b/system/hosts/vega/default.nix index 8c85e74..c908a19 100644 --- a/system/hosts/vega/default.nix +++ b/system/hosts/vega/default.nix @@ -4,6 +4,7 @@ ./configuration.nix ./hardware-configuration.nix ../../authorized-keys.nix + ../../features/gui.nix ]; nixpkgs.config.allowUnfree = true;