From 1abb1ca6a1b28e8d38e7ebd2f4dd5a0832e7398f Mon Sep 17 00:00:00 2001 From: aaron Date: Fri, 2 Oct 2026 09:25:30 +0200 Subject: [PATCH] chore: drop redundant packages and options - packages.nix is the baseline: drop neovim (nixvim), nvd, sof-firmware (enableAllFirmware), qtmultimedia (v4 leftover); vial moves to vial.nix, wl-clipboard to noctalia.nix, claude-code becomes a plain package here - drop packages and options already provided elsewhere: noctalia (home-manager), gnupg/pinentry-qt (agent), gtk/qt themes, sddm Theme.Current, zsh plugins (home-manager), group = users, empty firewall lists - single-package lists without `with pkgs;`, steam package inside its block Co-Authored-By: Claude Opus 5.5 --- modules/home-manager/nixvim.nix | 11 +++-------- modules/home-manager/styling.nix | 8 -------- modules/nixos/gnupg.nix | 19 +++++++------------ modules/nixos/networking.nix | 10 +--------- modules/nixos/niri.nix | 8 ++------ modules/nixos/noctalia.nix | 8 ++++---- modules/nixos/packages.nix | 9 ++------- modules/nixos/sddm.nix | 16 +++------------- modules/nixos/steam.nix | 13 +++---------- modules/nixos/thunar.nix | 9 ++------- modules/nixos/users.nix | 10 ++-------- modules/nixos/vial.nix | 21 ++++++++------------- 12 files changed, 37 insertions(+), 105 deletions(-) diff --git a/modules/home-manager/nixvim.nix b/modules/home-manager/nixvim.nix index e5fa692..a1e58ec 100644 --- a/modules/home-manager/nixvim.nix +++ b/modules/home-manager/nixvim.nix @@ -4,10 +4,7 @@ programs.nixvim = { enable = true; - # We keep `inputs.nixvim.inputs.nixpkgs.follows = "nixpkgs"` in flake.nix so - # the whole config shares a single nixpkgs. Setting `source` explicitly to - # that same nixpkgs acknowledges the override and silences nixvim's warning - # about its pinned nixpkgs being bypassed. + # same nixpkgs as the flake's `follows`, silences nixvim's pin warning nixpkgs.source = inputs.nixpkgs; # set aliases @@ -104,8 +101,6 @@ }; }; - # install dependencies - home.packages = with pkgs; [ - ripgrep - ]; + # telescope live_grep + home.packages = [ pkgs.ripgrep ]; } diff --git a/modules/home-manager/styling.nix b/modules/home-manager/styling.nix index 2a03ff5..c223d7c 100644 --- a/modules/home-manager/styling.nix +++ b/modules/home-manager/styling.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { - # set gtk theme gtk = { enable = true; theme = { @@ -13,7 +12,6 @@ gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; }; - # set qt theme qt = { enable = true; platformTheme.name = "qt6"; @@ -22,10 +20,4 @@ package = pkgs.adwaita-qt; }; }; - - # ensure packages are installed - home.packages = with pkgs; [ - gnome-themes-extra - adwaita-qt - ]; } diff --git a/modules/nixos/gnupg.nix b/modules/nixos/gnupg.nix index ff8d3bc..adf4a97 100644 --- a/modules/nixos/gnupg.nix +++ b/modules/nixos/gnupg.nix @@ -1,29 +1,24 @@ +# A graphical pinentry never grabs the tty, so a passphrase prompt can't take +# over a terminal driven by a coding agent. The cache lasts a working day, and +# an unattended signature fails after two minutes instead of blocking forever. + { config, pkgs, ... }: { - # enable gnupg agent programs.gnupg.agent = { enable = true; - # a graphical pinentry never grabs the tty, so a passphrase prompt can no - # longer take over a terminal that a coding agent is driving pinentryPackage = pkgs.pinentry-qt; settings = { - # keep the key unlocked for a full working day instead of 10 minutes, - # so signing commits asks at most once per session default-cache-ttl = 86400; max-cache-ttl = 86400; - # fail an unattended signature instead of blocking on a prompt forever pinentry-timeout = 120; }; }; - environment.systemPackages = with pkgs; [ - gnupg - pinentry-qt - # fallback for sessions without a display, switch pinentryPackage to use it - pinentry-curses + environment.systemPackages = [ + pkgs.pinentry-curses # fallback for sessions without a display # prime the passphrase cache on demand, e.g. before an agent session - (writeShellScriptBin "gpg-unlock" '' + (pkgs.writeShellScriptBin "gpg-unlock" '' echo | ${config.programs.gnupg.package}/bin/gpg --clearsign --output /dev/null echo "gpg key unlocked" '') diff --git a/modules/nixos/networking.nix b/modules/nixos/networking.nix index e30d243..99de910 100644 --- a/modules/nixos/networking.nix +++ b/modules/nixos/networking.nix @@ -1,20 +1,12 @@ { pkgs, ... }: { - # user networkmanager networking.networkmanager.enable = true; - # firewall default configs - networking.firewall.allowedTCPPorts = [ ]; - networking.firewall.allowedUDPPorts = [ ]; - - # enable wifi firmware + # wifi firmware and bluetooth hardware.enableAllFirmware = true; - - # enable bluetooth hardware.bluetooth.enable = true; - # Add network-related packages environment.systemPackages = with pkgs; [ wireguard-tools update-systemd-resolved diff --git a/modules/nixos/niri.nix b/modules/nixos/niri.nix index 41b6ceb..034aa24 100644 --- a/modules/nixos/niri.nix +++ b/modules/nixos/niri.nix @@ -1,11 +1,7 @@ { pkgs, ... }: { - # just enable and install niri + # compositor and session; the config itself lives in home-manager programs.niri.enable = true; - - # Add compositor-related packages - environment.systemPackages = with pkgs; [ - xwayland-satellite - ]; + environment.systemPackages = [ pkgs.xwayland-satellite ]; } diff --git a/modules/nixos/noctalia.nix b/modules/nixos/noctalia.nix index 1e66649..8dcacef 100644 --- a/modules/nixos/noctalia.nix +++ b/modules/nixos/noctalia.nix @@ -1,14 +1,14 @@ -{ pkgs, inputs, ... }: +{ pkgs, ... }: + { - # install noctalia and helper packages + # helpers for the noctalia shell (the shell itself comes from home-manager) environment.systemPackages = with pkgs; [ - inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default adw-gtk3 - adwaita-qt adwaita-qt6 brightnessctl ddcutil playerctl + wl-clipboard wl-mirror ]; } diff --git a/modules/nixos/packages.nix b/modules/nixos/packages.nix index 62b0cf7..05ce2f5 100644 --- a/modules/nixos/packages.nix +++ b/modules/nixos/packages.nix @@ -1,10 +1,11 @@ { pkgs, ... }: { - # system packages + # baseline tools for every host environment.systemPackages = with pkgs; [ btop cifs-utils + claude-code cowsay dnsutils ethtool @@ -14,31 +15,25 @@ imv iperf3 jq - kdePackages.qtmultimedia ldns lm_sensors lsof mtr - neovim nfs-utils nh nix-output-monitor nmap - nvd p7zip pciutils socat - sof-firmware strace sysstat tree unzip usbutils - vial vim wget which - wl-clipboard xz zip zstd diff --git a/modules/nixos/sddm.nix b/modules/nixos/sddm.nix index ff01042..e263efb 100644 --- a/modules/nixos/sddm.nix +++ b/modules/nixos/sddm.nix @@ -1,25 +1,15 @@ { pkgs, ... }: { - # enable sddm and use astronaut theme services.displayManager.sddm = { enable = true; wayland.enable = true; autoNumlock = true; enableHidpi = true; theme = "sddm-astronaut-theme"; - settings = { - Theme = { - Current = "sddm-astronaut-theme"; - }; - }; - extraPackages = with pkgs; [ - sddm-astronaut - ]; + extraPackages = [ pkgs.sddm-astronaut ]; # theme's qml dependencies }; - # Make the theme available in the system path so sddm can find it - environment.systemPackages = with pkgs; [ - sddm-astronaut - ]; + # sddm looks for themes in the system path + environment.systemPackages = [ pkgs.sddm-astronaut ]; } diff --git a/modules/nixos/steam.nix b/modules/nixos/steam.nix index 88671e2..593729e 100644 --- a/modules/nixos/steam.nix +++ b/modules/nixos/steam.nix @@ -1,20 +1,13 @@ { pkgs, ... }: { - # enable steam and open firewall programs.steam = { enable = true; + # fix black screen when running under xwayland-satellite + package = pkgs.steam.override { extraArgs = "-system-composer"; }; remotePlay.openFirewall = true; dedicatedServer.openFirewall = true; localNetworkGameTransfers.openFirewall = true; - # add proton-glorious-eggroll - extraCompatPackages = with pkgs; [ - proton-ge-bin - ]; - }; - - # fix black screen in steam when using xwayland-satellite - programs.steam.package = pkgs.steam.override { - extraArgs = "-system-composer"; + extraCompatPackages = [ pkgs.proton-ge-bin ]; }; } diff --git a/modules/nixos/thunar.nix b/modules/nixos/thunar.nix index f52061a..cb6a910 100644 --- a/modules/nixos/thunar.nix +++ b/modules/nixos/thunar.nix @@ -1,14 +1,9 @@ { pkgs, ... }: { - # Enable Thunar programs.thunar.enable = true; - # Install Tumbler thumbnailer service - environment.systemPackages = with pkgs; [ - tumbler - ]; - - # Ensure Thunar can locate the thumbnailer extensions + # thumbnails: tumbler service plus the path it loads extensions from + environment.systemPackages = [ pkgs.tumbler ]; environment.pathsToLink = [ "share/thumbnailers" ]; } diff --git a/modules/nixos/users.nix b/modules/nixos/users.nix index bd952dd..203b71f 100644 --- a/modules/nixos/users.nix +++ b/modules/nixos/users.nix @@ -1,10 +1,8 @@ { pkgs, ... }: { - # create users users.users.aaron = { isNormalUser = true; - group = "users"; extraGroups = [ "wheel" "networkmanager" @@ -13,10 +11,6 @@ shell = pkgs.zsh; }; - # add default zsh config - programs.zsh = { - enable = true; - enableCompletion = true; - autosuggestions.enable = true; - }; + # login shell; plugins and prompt are configured in home-manager + programs.zsh.enable = true; } diff --git a/modules/nixos/vial.nix b/modules/nixos/vial.nix index 5ffef76..5175017 100644 --- a/modules/nixos/vial.nix +++ b/modules/nixos/vial.nix @@ -1,26 +1,21 @@ +# Vial keyboards (lily58 pro r2g) expose a raw HID interface that vial.rocks +# drives over WebHID; its /dev/hidraw* node is root-only by default. +# The rule ships as 60-vial.rules because uaccess is only applied by +# 73-seat-late.rules, and services.udev.extraRules lands at 99, too late. + { pkgs, ... }: { - # Vial-capable keyboards (lily58 pro r2g) expose a second, non-keyboard raw - # HID interface that vial.rocks drives over WebHID. Its /dev/hidraw* node is - # root-only by default, so neither chromium nor the native app can open it. - # - # This has to ship as a numbered rules file rather than via - # services.udev.extraRules: extraRules lands in 99-local.rules, but the - # builtin that turns TAG+="uaccess" into an actual ACL is invoked from - # systemd's 73-seat-late.rules. A tag set at 99 is set too late to be seen, - # so the device ends up correctly tagged and still unreadable. 60- sorts - # safely ahead of 73. services.udev.packages = [ (pkgs.writeTextFile { name = "vial-udev-rules"; destination = "/lib/udev/rules.d/60-vial.rules"; - # Vial firmware advertises itself through a magic USB serial, so this - # matches any vial board rather than just the lily58. uaccess hands the - # device to whoever owns the active seat, no group membership needed. + # the magic serial matches any vial board; uaccess grants the seat owner text = '' KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", TAG+="uaccess" ''; }) ]; + + environment.systemPackages = [ pkgs.vial ]; }