From 8884bd51fdff72d558a7d4a76730d4074ddc4c60 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Wed, 30 Apr 2025 14:29:31 -0700 Subject: [PATCH] [container-dev] Switch to rootless docker. [nvim] Update snacks options. [hyprland] Use clipboard fixes globally --- home-manager/features/gaming.nix | 12 ----------- home-manager/features/hyprland.nix | 9 +++++++++ .../neovim/config/lua/plugins/snacks.lua | 12 +++++++++++ system/features/container-dev.nix | 17 ++++++++++++++++ system/features/gui.nix | 8 ++++++++ system/features/podman-dev.nix | 14 ------------- system/hosts/altair/configuration.nix | 5 ----- system/hosts/altair/default.nix | 2 ++ system/hosts/vega/configuration.nix | 20 ------------------- system/hosts/vega/default.nix | 9 ++------- system/hosts/vega/drew.nix | 2 +- 11 files changed, 51 insertions(+), 59 deletions(-) create mode 100644 system/features/container-dev.nix delete mode 100644 system/features/podman-dev.nix diff --git a/home-manager/features/gaming.nix b/home-manager/features/gaming.nix index 6647cc1..4f7798b 100644 --- a/home-manager/features/gaming.nix +++ b/home-manager/features/gaming.nix @@ -50,10 +50,6 @@ in # WoW addon updater wowup-cf - - # For clipboard management. See below. - wl-clipboard - xclip ]; # xdg.dataFile."applications/wowup-cf.desktop" = { @@ -61,14 +57,6 @@ in # source = "${patched-desktop}/wowup-cf.desktop"; # }; - wayland.windowManager.hyprland.settings.exec-once = [ - # Hyprland doesn't paste into Wine apps. This program is a workaround. - # See https://github.com/hyprwm/Hyprland/issues/2319 - # -t text = Only handle text - # -w xclip -selection clipboard = Watch for events and invoke xclip - "wl-paste -t text -w xclip -selection clipboard" - ]; - # wowup needs options to work under wayland. xdg.desktopEntries.wowup-cf = local.electronDesktopEntry { name = "WowUp"; diff --git a/home-manager/features/hyprland.nix b/home-manager/features/hyprland.nix index ee8e3f0..323056c 100644 --- a/home-manager/features/hyprland.nix +++ b/home-manager/features/hyprland.nix @@ -6,6 +6,10 @@ swaynotificationcenter # notifications hyprpolkitagent # Privilege managent hyprshot # Screenshot utility + + # For clipboard management. See below. + wl-clipboard + xclip ]; wayland.windowManager.hyprland = { @@ -37,6 +41,11 @@ "gsettings set org.gnome.desktop.interface color-scheme \"prefer-dark\"" "gsettings set org.gnome.desktop.interface gtk-theme \"Adwaita-dark\"" + # Hyprland doesn't paste into Firefox or Wine apps. This program is a workaround. + # See https://github.com/hyprwm/Hyprland/issues/2319 + # -t text = Only handle text + # -w xclip -selection clipboard = Watch for events and invoke xclip + "wl-paste -t text -w xclip -selection clipboard" ]; env = [ diff --git a/home-manager/features/neovim/config/lua/plugins/snacks.lua b/home-manager/features/neovim/config/lua/plugins/snacks.lua index f7d630b..87528a9 100644 --- a/home-manager/features/neovim/config/lua/plugins/snacks.lua +++ b/home-manager/features/neovim/config/lua/plugins/snacks.lua @@ -1,6 +1,18 @@ return { "folke/snacks.nvim", ---@type snacks.Config + opts = { + matcher = { + -- Enable frecensy for matchers + frecency = true, + }, + picker = { + smart = { + -- Remove the "recent" picker so we don't get things from other directories. + multi = { "buffers", "files" }, + }, + }, + }, keys = { { "", diff --git a/system/features/container-dev.nix b/system/features/container-dev.nix new file mode 100644 index 0000000..448e19a --- /dev/null +++ b/system/features/container-dev.nix @@ -0,0 +1,17 @@ +{ ... }: +{ + virtualisation = { + docker = { + enable = true; + rootless.enable = true; + }; + }; + + home-manager.users.drew = { ... }: + { + # Add the path to the docker socket to the environment. + programs.zsh.profileExtra = '' + export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock + ''; + }; +} diff --git a/system/features/gui.nix b/system/features/gui.nix index 3457482..0aa17d5 100644 --- a/system/features/gui.nix +++ b/system/features/gui.nix @@ -26,4 +26,12 @@ xwayland.enable = true; }; + programs.sway = { + enable = true; + xwayland.enable = true; + wrapperFeatures = { + gtk = true; + base = true; + }; + }; } diff --git a/system/features/podman-dev.nix b/system/features/podman-dev.nix deleted file mode 100644 index 71bebd6..0000000 --- a/system/features/podman-dev.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: -{ - virtualisation = { - podman = { - enable = true; - - # Create a `docker` alias for podman, to use it as a drop-in replacement - dockerCompat = true; - - # Required for containers under podman-compose to be able to talk to each other. - defaultNetwork.settings.dns_enabled = true; - }; - }; -} diff --git a/system/hosts/altair/configuration.nix b/system/hosts/altair/configuration.nix index a2e7dd7..7b825ae 100644 --- a/system/hosts/altair/configuration.nix +++ b/system/hosts/altair/configuration.nix @@ -8,11 +8,6 @@ }: { - imports = [ - ./qmk.nix - ../../features/podman-dev.nix - ]; - networking.hostName = "altair"; # Define your hostname. # Configure network proxy if necessary diff --git a/system/hosts/altair/default.nix b/system/hosts/altair/default.nix index 40a7ce8..7abb143 100644 --- a/system/hosts/altair/default.nix +++ b/system/hosts/altair/default.nix @@ -3,9 +3,11 @@ imports = [ ./configuration.nix ./hardware-configuration.nix + ./qmk.nix ../../authorized-keys.nix ../../features/gc.nix ../../features/gui.nix + ../../features/container-dev.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/system/hosts/vega/configuration.nix b/system/hosts/vega/configuration.nix index 671defc..16bfc1a 100644 --- a/system/hosts/vega/configuration.nix +++ b/system/hosts/vega/configuration.nix @@ -1,9 +1,5 @@ { pkgs, ... }: { - imports = [ - ../../features/podman-dev.nix - ]; - networking.hostName = "vega"; # Define your hostname. # Configure network proxy if necessary @@ -80,16 +76,10 @@ # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; - # Allow unfree packages - nixpkgs.config = { - allowUnfree = true; - }; - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ vim - sddm-astronaut ]; # Some programs need SUID wrappers, can be configured further or are @@ -138,16 +128,6 @@ "flakes" ]; - programs.steam = { - enable = true; - # Open ports in the firewall for Steam Remote Play - remotePlay.openFirewall = true; - # Open ports in the firewall for Source Dedicated Server - dedicatedServer.openFirewall = true; - # Open ports in the firewall for Steam Local Network Game Transfers - localNetworkGameTransfers.openFirewall = true; - }; - services.openssh.enable = true; # Enable the font directory for managing fonts diff --git a/system/hosts/vega/default.nix b/system/hosts/vega/default.nix index 40a7ce8..3ca21ba 100644 --- a/system/hosts/vega/default.nix +++ b/system/hosts/vega/default.nix @@ -6,15 +6,10 @@ ../../authorized-keys.nix ../../features/gc.nix ../../features/gui.nix + ../../features/container-dev.nix ]; nixpkgs.config.allowUnfree = true; - home-manager.users.drew = - { ... }: - { - imports = [ - ./drew.nix - ]; - }; + home-manager.users.drew = import ./drew.nix; } diff --git a/system/hosts/vega/drew.nix b/system/hosts/vega/drew.nix index 5b1bd95..5c039ef 100644 --- a/system/hosts/vega/drew.nix +++ b/system/hosts/vega/drew.nix @@ -27,7 +27,7 @@ # Set up eww here because it's based on the monitor configuration # Eww is idempotent, so it's fine to just run it on every reload to make sure things are open exec = [ - "eww daemon && eww open-many vertical-statusbar" + "sleep 2 && eww open-many vertical-statusbar" ]; # Set up workspaces for this system # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules