Skip to content

Migrate NixOS configuration from GNOME to Hyprland with replicable setup - #2

Draft
sanchit-lamba with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-990d82ec-c213-4cda-ae8d-a34ca4bf7512
Draft

Migrate NixOS configuration from GNOME to Hyprland with replicable setup#2
sanchit-lamba with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-990d82ec-c213-4cda-ae8d-a34ca4bf7512

Conversation

Copilot AI commented Aug 24, 2025

Copy link
Copy Markdown
Contributor

This PR completely migrates the NixOS system from GNOME desktop environment to Hyprland, following the structure and approach from Sly-Harvey/NixOS while preserving all existing user packages and system functionality.

Changes Made

Desktop Environment Migration

  • Replaced GNOME with Hyprland: Removed services.xserver.desktopManager.gnome and GDM display manager
  • Added SDDM display manager: Better suited for Wayland compositors like Hyprland
  • Created comprehensive Hyprland module at modules/desktop/hyprland/default.nix with full window management configuration

System Package Cleanup

Removed GNOME-specific packages while keeping useful applications:

  • Removed: gnome-calculator, gnome-tweaks, gnome-shell-extensions, gnome-themes-extra, etc.
  • Preserved: All user applications like vscode, obsidian, neovim, firefox, ghostty, obs-studio, etc.
  • Added: Essential Wayland tools like waybar, rofi-wayland, swaync, grimblast, cliphist

Home Manager Updates

  • Removed GNOME dconf settings: Cleaned up GNOME-specific window manager preferences
  • Removed Firefox GNOME theme: Eliminated dependency on firefox-gnome-theme input
  • Preserved GTK theming: Kept gruvbox-dark theme, Gruvbox-Plus-Dark icons, and Bibata cursors for application compatibility

Hyprland Ecosystem

Added complete Hyprland setup with:

  • Waybar: Status bar with workspaces, system info, and tray integration
  • Rofi: Application launcher with gruvbox theme (Super+Space)
  • SwayNC: Modern notification daemon (Super+Shift+Q to toggle)
  • Screenshot tools: grim, slurp, grimblast for screen capture
  • Clipboard management: cliphist with rofi integration (Super+V)

Key Features

Window Management

  • Tiling layout: Automatic window arrangement with dwindle algorithm
  • Workspace switching: Super+1-9 for navigation, Super+Shift+1-9 to move windows
  • Floating mode: Super+W to toggle, with proper window rules for dialogs
  • Focus movement: Arrow keys or hjkl-style navigation

System Integration

  • Volume/brightness keys: Hardware function keys work out of the box
  • Network management: NetworkManager applet in system tray
  • Audio control: PulseAudio/PipeWire integration with pavucontrol
  • Proper XDG portals: File dialogs and desktop integration working correctly

Preserved Functionality

All existing system services and configuration remain intact:

  • Sound system: PipeWire with ALSA and Pulse compatibility
  • Hardware support: ASUSD, Docker, ADB services
  • Network configuration: Existing NetworkManager setup
  • User packages: Complete preservation of development and productivity tools

Documentation

  • MIGRATION_GUIDE.md: Comprehensive guide explaining all changes and differences
  • modules/desktop/hyprland/README.md: Quick reference for Hyprland features and keybindings
  • Keybinding reference: All essential shortcuts documented for easy transition

The migration maintains the same replicable, declarative approach as the original GNOME setup while providing a modern, efficient tiling window manager experience. All user workflows are preserved with improved keyboard-driven navigation.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits August 24, 2025 12:42
Co-authored-by: sanchit-lamba <121615638+sanchit-lamba@users.noreply.github.com>
Co-authored-by: sanchit-lamba <121615638+sanchit-lamba@users.noreply.github.com>
Copilot AI changed the title [WIP] migrate my gnome nixos system to hyprland with the same replicable config as defined in the repo @Sly-Harvey/NixOS I still want to keep home manager and my packages just remove everything gnome specific and things that only make sense with gnome Migrate NixOS configuration from GNOME to Hyprland with replicable setup Aug 24, 2025
Copilot AI requested a review from sanchit-lamba August 24, 2025 12:45
@sanchit-lamba

Copy link
Copy Markdown
Owner

during evaluation "[root@BlitzWing:/etc/nixos/modules/desktop/hyprland]# nixos-rebuild switch
warning: Git tree '/etc/nixos' is dirty
building the system configuration...
warning: Git tree '/etc/nixos' is dirty
error:
… while calling the 'head' builtin
at /nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/lib/attrsets.nix:1534:13:
1533| if length values == 1 || pred here (elemAt values 1) (head values) then
1534| head values
| ^
1535| else

   … while evaluating the attribute 'value'
     at /nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/lib/modules.nix:1083:7:
     1082|     // {
     1083|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
         |       ^
     1084|       inherit (res.defsFinal') highestPrio;

   … while evaluating the option `system.build.toplevel':

   … while evaluating definitions from `/nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/nixos/modules/system/activation/top-level.nix':

   … while evaluating the option `system.systemBuilderArgs':

   … while evaluating definitions from `/nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/nixos/modules/system/activation/activatable-system.nix':

   … while evaluating the option `system.activationScripts.etc.text':

   … while evaluating definitions from `/nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/nixos/modules/system/etc/etc-activation.nix':

   … while evaluating definitions from `/nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/nixos/modules/system/etc/etc.nix':

   … while evaluating the option `environment.etc.dbus-1.source':

   … while evaluating the option `environment.systemPackages':

   … while evaluating definitions from `/nix/store/zdibc0ddpd8aq858v8dssvx53mirldkc-source/modules/desktop/hyprland':

   (stack trace truncated; use '--show-trace' to show the full, detailed trace)

   error: The top-level polkit-kde-agent alias has been removed.

   Please explicitly use kdePackages.polkit-kde-agent-1 for the latest Qt 6-based version,
   or libsForQt5.polkit-kde-agent for the deprecated Qt 5 version.

   Note that Qt 5 versions of most KDE software will be removed in NixOS 25.11.

[root@BlitzWing:/etc/nixos/modules/desktop/hyprland]#"
was the issue and also I replaced the swaync to swaynotificationcenter to correctly represent the package name make those changes now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants