From 2505298449b46e9a70ab3051b1fd4e8df1e2395f Mon Sep 17 00:00:00 2001 From: Melvin Ragusa Date: Mon, 2 Feb 2026 18:08:01 +0100 Subject: [PATCH] Normalize Nix module formatting and update flake.lock Consistently format module argument blocks and convert aligned package comments to inline comments. Trim trailing whitespace and minor layout tweaks across modules. Bump opencode rev, narHash and lastModified in flake.lock and remove the original dev ref. --- flake.lock | 7 ++-- modules/apps.nix | 69 ++++++++++++++++++++------------------ modules/audio.nix | 41 ++++++++++++++++------ modules/desktop.nix | 34 +++++++++++-------- modules/dev.nix | 69 ++++++++++++++++++++------------------ modules/gaming.nix | 35 ++++++++++--------- modules/gpu-amd.nix | 21 +++++++----- modules/navidrome.nix | 11 ++++-- modules/power.nix | 7 +++- modules/services.nix | 23 ++++++++----- modules/shell.nix | 19 +++++++---- modules/virtualization.nix | 17 ++++++---- 12 files changed, 212 insertions(+), 141 deletions(-) diff --git a/flake.lock b/flake.lock index 021ada2..0c6ca9e 100644 --- a/flake.lock +++ b/flake.lock @@ -275,16 +275,15 @@ ] }, "locked": { - "lastModified": 1770050462, - "narHash": "sha256-SvIR3FrTRJE77C0JUowvItVqX/GBm830hXziN8KgHeU=", + "lastModified": 1770051391, + "narHash": "sha256-Z8DdRW3NCdzAlgF3xgjZCIU4MRCPCEv3wPZTsxVcQuk=", "owner": "anomalyco", "repo": "opencode", - "rev": "cf8b033be1cbe9f20bc0921d9920a66c0d95c704", + "rev": "cf828fff85b50baf8c57cc3811c8789d9adbcae2", "type": "github" }, "original": { "owner": "anomalyco", - "ref": "dev", "repo": "opencode", "type": "github" } diff --git a/modules/apps.nix b/modules/apps.nix index fddf4e7..9d0a002 100644 --- a/modules/apps.nix +++ b/modules/apps.nix @@ -1,50 +1,55 @@ # modules/apps.nix # User applications: media, productivity, communication, system utilities -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { environment.systemPackages = with pkgs; [ # ───────────────────────────────────────────────────────────── # Media Viewers # ───────────────────────────────────────────────────────────── - loupe # GNOME image viewer - evince # PDF/document viewer - celluloid # MPV frontend (GTK video player) - mpv # Powerful CLI video player + loupe # GNOME image viewer + evince # PDF/document viewer + celluloid # MPV frontend (GTK video player) + mpv # Powerful CLI video player # ───────────────────────────────────────────────────────────── # Music # ───────────────────────────────────────────────────────────── - amberol # Simple music player for local files - feishin # Navidrome/Jellyfin client - picard # MusicBrainz Picard - music tagger - beets # Music library manager - cava # Audio visualizer + amberol # Simple music player for local files + feishin # Navidrome/Jellyfin client + picard # MusicBrainz Picard - music tagger + beets # Music library manager + cava # Audio visualizer # Feishin available via Flatpak for Navidrome/Jellyfin # ───────────────────────────────────────────────────────────── # Communication # ───────────────────────────────────────────────────────────── - vesktop # Discord client (Wayland-native, with Vencord) - thunderbird # Email client - signal-desktop # Encrypted messaging - telegram-desktop # Telegram client + vesktop # Discord client (Wayland-native, with Vencord) + thunderbird # Email client + signal-desktop # Encrypted messaging + telegram-desktop # Telegram client # ───────────────────────────────────────────────────────────── # Office & Productivity # ───────────────────────────────────────────────────────────── - libreoffice-fresh # Office suite (latest) - obsidian # Note-taking with Markdown + libreoffice-fresh # Office suite (latest) + obsidian # Note-taking with Markdown # ───────────────────────────────────────────────────────────── # System Utilities # ───────────────────────────────────────────────────────────── - btop # Modern system monitor (terminal) - mission-center # GNOME system monitor (GUI, like Windows Task Manager) - + btop # Modern system monitor (terminal) + mission-center # GNOME system monitor (GUI, like Windows Task Manager) + # File management - file-roller # Archive manager (GUI) - gnome-disk-utility # Disk management + file-roller # Archive manager (GUI) + gnome-disk-utility # Disk management # Archive tools (for file-roller and CLI) unzip @@ -55,29 +60,29 @@ # ───────────────────────────────────────────────────────────── # Screenshots & Screen Recording # ───────────────────────────────────────────────────────────── - swappy # Screenshot annotation tool + swappy # Screenshot annotation tool # grim + slurp already in your base config # Screen recording - obs-studio # Full-featured streaming/recording suite + obs-studio # Full-featured streaming/recording suite gpu-screen-recorder # Lightweight GPU-accelerated recorder (AMD/NVIDIA/Intel) - kooha # Simple GNOME-style screen recorder + kooha # Simple GNOME-style screen recorder # ───────────────────────────────────────────────────────────── # Security & Passwords # ───────────────────────────────────────────────────────────── - bitwarden-desktop # Password manager - seahorse # GNOME Keyring GUI + bitwarden-desktop # Password manager + seahorse # GNOME Keyring GUI # ───────────────────────────────────────────────────────────── # Utilities # ───────────────────────────────────────────────────────────── - gnome-calculator # Calculator - gnome-clocks # World clocks, alarms, timers - baobab # Disk usage analyzer - localsend # AirDrop-like file sharing (cross-platform) - meld # Visual diff and merge tool - rclone # Cloud storage sync (Google Drive, Dropbox, etc.) + gnome-calculator # Calculator + gnome-clocks # World clocks, alarms, timers + baobab # Disk usage analyzer + localsend # AirDrop-like file sharing (cross-platform) + meld # Visual diff and merge tool + rclone # Cloud storage sync (Google Drive, Dropbox, etc.) ]; # GNOME Keyring for secrets storage diff --git a/modules/audio.nix b/modules/audio.nix index 8eedd73..a27ba22 100644 --- a/modules/audio.nix +++ b/modules/audio.nix @@ -1,6 +1,11 @@ # modules/audio.nix # Audio and Bluetooth configuration: Blueman GUI, volume control, media keys -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # Bluetooth GUI management @@ -9,17 +14,17 @@ # Audio packages environment.systemPackages = with pkgs; [ # PipeWire volume control - pwvucontrol # Modern PipeWire volume control (Qt) - pavucontrol # Classic PulseAudio volume control (GTK) - as backup - helvum # PipeWire patchbay for routing audio - qpwgraph # PipeWire graph editor (visual audio routing) + pwvucontrol # Modern PipeWire volume control (Qt) + pavucontrol # Classic PulseAudio volume control (GTK) - as backup + helvum # PipeWire patchbay for routing audio + qpwgraph # PipeWire graph editor (visual audio routing) # Media player control - playerctl # Control media players via D-Bus (for media keys) + playerctl # Control media players via D-Bus (for media keys) # Audio tools - easyeffects # Audio effects and equalizer for PipeWire - + easyeffects # Audio effects and equalizer for PipeWire + # Bluetooth audio codecs are handled by PipeWire automatically ]; @@ -34,10 +39,26 @@ "bluez5.enable-hw-volume" = true; # Bluetooth headset roles - "bluez5.roles" = [ "a2dp_sink" "a2dp_source" "bap_sink" "bap_source" "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ]; + "bluez5.roles" = [ + "a2dp_sink" + "a2dp_source" + "bap_sink" + "bap_source" + "hsp_hs" + "hsp_ag" + "hfp_hf" + "hfp_ag" + ]; # Codec preference order (highest quality first) - "bluez5.codecs" = [ "ldac" "aac" "aptx_hd" "aptx" "sbc_xq" "sbc" ]; + "bluez5.codecs" = [ + "ldac" + "aac" + "aptx_hd" + "aptx" + "sbc_xq" + "sbc" + ]; }; }; }; diff --git a/modules/desktop.nix b/modules/desktop.nix index e638f4b..e9869de 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -1,6 +1,12 @@ # modules/desktop.nix # Core desktop infrastructure: portals, polkit, launcher, screen lock, wallpaper, idle -{ config, pkgs, inputs, lib, ... }: +{ + config, + pkgs, + inputs, + lib, + ... +}: { # XDG Portal - Required for screen sharing, file pickers, etc. @@ -42,26 +48,26 @@ # Wayland utilities wl-clipboard - wtype # Wayland keyboard automation - wlr-randr # Display configuration - wayland-utils # Debug utilities + wtype # Wayland keyboard automation + wlr-randr # Display configuration + wayland-utils # Debug utilities # ───────────────────────────────────────────────────────────── # Additional desktop utilities (migrated from Arch) # ───────────────────────────────────────────────────────────── - cliphist # Clipboard history for Wayland - wlsunset # Blue light filter / night mode - brightnessctl # Brightness control (even for desktop monitors via DDC) - wlogout # Logout menu / session manager + cliphist # Clipboard history for Wayland + wlsunset # Blue light filter / night mode + brightnessctl # Brightness control (even for desktop monitors via DDC) + wlogout # Logout menu / session manager ]; # Environment variables for Wayland compatibility environment.sessionVariables = { # Wayland defaults - NIXOS_OZONE_WL = "1"; # Electron apps use Wayland - MOZ_ENABLE_WAYLAND = "1"; # Firefox Wayland - QT_QPA_PLATFORM = "wayland"; # Qt apps use Wayland - SDL_VIDEODRIVER = "wayland"; # SDL games use Wayland + NIXOS_OZONE_WL = "1"; # Electron apps use Wayland + MOZ_ENABLE_WAYLAND = "1"; # Firefox Wayland + QT_QPA_PLATFORM = "wayland"; # Qt apps use Wayland + SDL_VIDEODRIVER = "wayland"; # SDL games use Wayland _JAVA_AWT_WM_NONREPARENTING = "1"; # Java apps fix # XDG @@ -73,6 +79,6 @@ programs.dconf.enable = true; # GNOME services for better desktop integration - services.gvfs.enable = true; # Virtual filesystem (trash, MTP, SMB) - services.udisks2.enable = true; # Disk mounting + services.gvfs.enable = true; # Virtual filesystem (trash, MTP, SMB) + services.udisks2.enable = true; # Disk mounting } diff --git a/modules/dev.nix b/modules/dev.nix index d9d7244..9c8b188 100644 --- a/modules/dev.nix +++ b/modules/dev.nix @@ -1,12 +1,17 @@ # modules/dev.nix # Development tools: Docker, Node.js, direnv, build tools -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # Docker virtualisation.docker = { enable = true; - + # Recommended settings autoPrune = { enable = true; @@ -21,7 +26,7 @@ # Direnv for per-project environments programs.direnv = { enable = true; - nix-direnv.enable = true; # Faster direnv for Nix + nix-direnv.enable = true; # Faster direnv for Nix }; # Development packages @@ -29,16 +34,16 @@ # ───────────────────────────────────────────────────────────── # Containers # ───────────────────────────────────────────────────────────── - docker-compose # Docker Compose v2 - lazydocker # Terminal UI for Docker + docker-compose # Docker Compose v2 + lazydocker # Terminal UI for Docker # ───────────────────────────────────────────────────────────── # Languages & Runtimes # ───────────────────────────────────────────────────────────── - nodejs_22 # Node.js LTS (for Vicinae extensions, etc.) - bun # Fast JavaScript runtime/bundler - python3 # Python 3 - rustup # Rust toolchain manager + nodejs_22 # Node.js LTS (for Vicinae extensions, etc.) + bun # Fast JavaScript runtime/bundler + python3 # Python 3 + rustup # Rust toolchain manager # ───────────────────────────────────────────────────────────── # Build Tools @@ -47,48 +52,48 @@ gnumake cmake pkg-config - + # ───────────────────────────────────────────────────────────── # Version Control # ───────────────────────────────────────────────────────────── git - gh # GitHub CLI - lazygit # Terminal UI for Git - delta # Better git diff + gh # GitHub CLI + lazygit # Terminal UI for Git + delta # Better git diff # ───────────────────────────────────────────────────────────── # Editors & LSP # ───────────────────────────────────────────────────────────── # nil already in base config (Nix LSP) - nixfmt-rfc-style # Nix formatter + nixfmt # Nix formatter # ───────────────────────────────────────────────────────────── # CLI Utilities # ───────────────────────────────────────────────────────────── - jq # JSON processor - yq # YAML processor - ripgrep # Fast grep - fd # Fast find - fzf # Fuzzy finder - eza # Modern ls - bat # Cat with syntax highlighting - httpie # Better curl - curlie # Curl wrapper with httpie-like syntax + jq # JSON processor + yq # YAML processor + ripgrep # Fast grep + fd # Fast find + fzf # Fuzzy finder + eza # Modern ls + bat # Cat with syntax highlighting + httpie # Better curl + curlie # Curl wrapper with httpie-like syntax # Additional CLI tools (migrated from Arch) - tealdeer # tldr - simplified man pages - duf # Better df (disk usage) - sd # Better sed (find & replace) - pv # Pipe viewer (progress bar for pipes) - parallel # GNU parallel (run commands in parallel) - inxi # System information tool - glances # System monitor (htop alternative) - grc # Generic colorizer for CLI output + tealdeer # tldr - simplified man pages + duf # Better df (disk usage) + sd # Better sed (find & replace) + pv # Pipe viewer (progress bar for pipes) + parallel # GNU parallel (run commands in parallel) + inxi # System information tool + glances # System monitor (htop alternative) + grc # Generic colorizer for CLI output # ───────────────────────────────────────────────────────────── # Database Tools # ───────────────────────────────────────────────────────────── - dbeaver-bin # Universal database tool (GUI) + dbeaver-bin # Universal database tool (GUI) ]; # Note: Shell aliases are now managed in shell.nix (Fish shell) diff --git a/modules/gaming.nix b/modules/gaming.nix index 0820b37..f42ac96 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -1,25 +1,30 @@ # modules/gaming.nix # Full gaming setup: Steam, Gamemode, Lutris, Heroic, Wine, Proton -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # Steam programs.steam = { enable = true; - remotePlay.openFirewall = true; # Steam Remote Play - dedicatedServer.openFirewall = true; # Dedicated servers - localNetworkGameTransfers.openFirewall = true; # LAN game transfers + remotePlay.openFirewall = true; # Steam Remote Play + dedicatedServer.openFirewall = true; # Dedicated servers + localNetworkGameTransfers.openFirewall = true; # LAN game transfers # Extra compatibility packages for Proton extraCompatPackages = with pkgs; [ - proton-ge-bin # GloriousEggroll's Proton fork - better compatibility + proton-ge-bin # GloriousEggroll's Proton fork - better compatibility ]; }; # Gamemode - Optimize system for gaming programs.gamemode = { enable = true; - enableRenice = true; # Allow renice for priority boost + enableRenice = true; # Allow renice for priority boost settings = { general = { renice = 10; @@ -40,20 +45,20 @@ # Gaming packages environment.systemPackages = with pkgs; [ # Game launchers - lutris # Multi-platform game launcher - heroic # Epic Games & GOG launcher + lutris # Multi-platform game launcher + heroic # Epic Games & GOG launcher # Proton management - protonup-qt # GUI to manage Proton-GE versions + protonup-qt # GUI to manage Proton-GE versions # Wine for non-Steam games - wineWowPackages.stagingFull # Latest Wine with all features - winetricks # Wine helper scripts - protontricks # Proton helper scripts (like winetricks for Proton) + wineWowPackages.stagingFull # Latest Wine with all features + winetricks # Wine helper scripts + protontricks # Proton helper scripts (like winetricks for Proton) # Misc gaming utilities - gamemode # CLI tool to trigger gamemode - gamescope # Micro-compositor for games (fixes some issues) + gamemode # CLI tool to trigger gamemode + gamescope # Micro-compositor for games (fixes some issues) ]; # Gaming-related kernel tweaks @@ -68,7 +73,7 @@ # Udev rules for game controllers services.udev.packages = with pkgs; [ - game-devices-udev-rules # Support for various game controllers + game-devices-udev-rules # Support for various game controllers ]; # Add user to gamemode group diff --git a/modules/gpu-amd.nix b/modules/gpu-amd.nix index edcd265..c135488 100644 --- a/modules/gpu-amd.nix +++ b/modules/gpu-amd.nix @@ -1,16 +1,21 @@ # modules/gpu-amd.nix # AMD GPU configuration: drivers, Vulkan, VA-API hardware acceleration, CoreCtrl -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # Enable OpenGL/Vulkan hardware.graphics = { enable = true; - enable32Bit = true; # For Steam and 32-bit games + enable32Bit = true; # For Steam and 32-bit games extraPackages = with pkgs; [ # VA-API for hardware video acceleration - libva-vdpau-driver # Renamed from vaapiVdpau + libva-vdpau-driver # Renamed from vaapiVdpau libvdpau-va-gl # OpenCL support (optional, for compute workloads) @@ -45,15 +50,15 @@ # GPU monitoring tools environment.systemPackages = with pkgs; [ # Monitoring - radeontop # AMD GPU monitoring (like nvidia-smi) - nvtopPackages.amd # Modern GPU monitor with AMD support + radeontop # AMD GPU monitoring (like nvidia-smi) + nvtopPackages.amd # Modern GPU monitor with AMD support # Vulkan tools - vulkan-tools # vulkaninfo, etc. + vulkan-tools # vulkaninfo, etc. vulkan-loader # Video acceleration verification - libva-utils # vainfo - verify VA-API - vdpauinfo # Verify VDPAU + libva-utils # vainfo - verify VA-API + vdpauinfo # Verify VDPAU ]; } diff --git a/modules/navidrome.nix b/modules/navidrome.nix index c6b72dc..e2a4cc3 100644 --- a/modules/navidrome.nix +++ b/modules/navidrome.nix @@ -1,6 +1,11 @@ # modules/navidrome.nix # Self-hosted music streaming server -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # ═══════════════════════════════════════════════════════════════ @@ -24,8 +29,8 @@ EnableTranscodingConfig = true; # Scan settings - ScanSchedule = "@every 1h"; # Rescan library every hour - + ScanSchedule = "@every 1h"; # Rescan library every hour + # Last.fm scrobbling (configure in UI after setup) LastFM.Enabled = true; diff --git a/modules/power.nix b/modules/power.nix index 8a19650..f00b858 100644 --- a/modules/power.nix +++ b/modules/power.nix @@ -1,6 +1,11 @@ # modules/power.nix # Power management for desktop: CPU governor control, power profiles -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # ═══════════════════════════════════════════════════════════════ diff --git a/modules/services.nix b/modules/services.nix index db883a3..e61b306 100644 --- a/modules/services.nix +++ b/modules/services.nix @@ -1,6 +1,11 @@ # modules/services.nix # System services: SSD maintenance, swap, mDNS, profile sync -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # ═══════════════════════════════════════════════════════════════ @@ -18,8 +23,8 @@ # Compressed swap in RAM - better than no swap, faster than disk zramSwap = { enable = true; - algorithm = "zstd"; # Best compression ratio - memoryPercent = 50; # Use up to 50% of RAM for compressed swap + algorithm = "zstd"; # Best compression ratio + memoryPercent = 50; # Use up to 50% of RAM for compressed swap }; # ═══════════════════════════════════════════════════════════════ @@ -28,9 +33,9 @@ # mDNS for local network discovery (.local domains) services.avahi = { enable = true; - nssmdns4 = true; # Enable .local resolution - openFirewall = true; # Allow mDNS through firewall - + nssmdns4 = true; # Enable .local resolution + openFirewall = true; # Allow mDNS through firewall + publish = { enable = true; addresses = true; @@ -53,7 +58,7 @@ # ═══════════════════════════════════════════════════════════════ # ADDITIONAL SYSTEM OPTIMIZATIONS # ═══════════════════════════════════════════════════════════════ - + # Enable firmware updates services.fwupd.enable = true; @@ -64,8 +69,8 @@ # Early OOM killer - prevents system freeze on memory exhaustion services.earlyoom = { enable = true; - freeMemThreshold = 5; # Start killing at 5% free memory - freeSwapThreshold = 10; # Also consider swap + freeMemThreshold = 5; # Start killing at 5% free memory + freeSwapThreshold = 10; # Also consider swap enableNotifications = true; }; diff --git a/modules/shell.nix b/modules/shell.nix index 8e1f17a..bc340ef 100644 --- a/modules/shell.nix +++ b/modules/shell.nix @@ -1,6 +1,11 @@ # modules/shell.nix # Fish shell configuration with plugins and aliases -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # Enable Fish shell @@ -98,13 +103,13 @@ # Fish plugins (managed by NixOS) environment.systemPackages = with pkgs; [ # Fish plugins - fishPlugins.pure # Pure prompt (minimal & fast) - fishPlugins.autopair # Auto-close brackets, quotes - fishPlugins.fzf-fish # Fzf integration for fish - fishPlugins.done # Notification when long command finishes - fishPlugins.grc # Colorize command output + fishPlugins.pure # Pure prompt (minimal & fast) + fishPlugins.autopair # Auto-close brackets, quotes + fishPlugins.fzf-fish # Fzf integration for fish + fishPlugins.done # Notification when long command finishes + fishPlugins.grc # Colorize command output # Required by aliases - dust # Better du + dust # Better du ]; } diff --git a/modules/virtualization.nix b/modules/virtualization.nix index cb69830..f2665fd 100644 --- a/modules/virtualization.nix +++ b/modules/virtualization.nix @@ -1,6 +1,11 @@ # modules/virtualization.nix # Virtual machine support: QEMU, KVM, libvirt, virt-manager -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { # ═══════════════════════════════════════════════════════════════ @@ -36,11 +41,11 @@ # PACKAGES # ═══════════════════════════════════════════════════════════════ environment.systemPackages = with pkgs; [ - virt-manager # GUI for managing VMs - virt-viewer # Viewer for VM displays (SPICE/VNC) - virtiofsd # Fast file sharing between host and VM - qemu-utils # QEMU utilities (qemu-img, etc.) - spice-gtk # SPICE client libraries + virt-manager # GUI for managing VMs + virt-viewer # Viewer for VM displays (SPICE/VNC) + virtiofsd # Fast file sharing between host and VM + qemu-utils # QEMU utilities (qemu-img, etc.) + spice-gtk # SPICE client libraries ]; # ═══════════════════════════════════════════════════════════════