Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# GNOME to Hyprland Migration Guide

This document describes the migration from GNOME to Hyprland that has been performed on your NixOS configuration.

## What Was Changed

### 1. Desktop Environment
- **Removed**: GNOME desktop environment and GDM display manager
- **Added**: Hyprland compositor with SDDM display manager
- **Reason**: Modern tiling window manager with better Wayland support

### 2. System Packages Removed
The following GNOME-specific packages were removed:
- `gnome-calculator`, `gnome-characters`, `gnome-color-manager`
- `gnome-disk-utility`, `gnome-system-monitor`, `gnome-terminal`
- `gnome-text-editor`, `gnome-tweaks`, `gnome-shell-extensions`
- `gnome-themes-extra`

### 3. New Hyprland Ecosystem Added
- **Waybar**: Status bar showing workspaces, time, system info
- **Rofi**: Application launcher (Super+Space)
- **SwayNC**: Notification daemon
- **Hyprpaper**: Wallpaper management
- **Grimblast/Grim/Slurp**: Screenshot tools
- **Cliphist**: Clipboard manager

### 4. Home Manager Changes
- Removed GNOME-specific dconf settings
- Removed Firefox GNOME theme dependency
- Kept GTK theming for application compatibility
- Added Hyprland, Waybar, and Rofi configurations

## What Was Preserved

### User Applications
All your existing applications are preserved:
- Development tools (vscode, obsidian, neovim, gh, git)
- Media (haruna, mpv, obs-studio, thunderbird)
- System utilities (asusctl, android-tools, lm_sensors)
- Browsers (firefox, vivaldi)
- Terminal (ghostty)

### System Configuration
- Sound system (PipeWire)
- Network management
- Docker, ADB, ASUSD services
- User account and groups
- Theming (gruvbox-dark preserved)

### Hardware Support
- All existing hardware configurations maintained
- Wayland utilities preserved
- Existing kernel modules and drivers

## Key Differences

### Window Management
- **GNOME**: Traditional desktop with overview and activities
- **Hyprland**: Tiling window manager with workspaces

### Application Launching
- **GNOME**: Activities overview or Alt+F2
- **Hyprland**: Rofi launcher (Super+Space)

### System Settings
- **GNOME**: GNOME Settings and Tweaks
- **Hyprland**: System settings through individual applications (pavucontrol, nm-applet, etc.)

## Getting Started

### Essential Keybindings
- `Super+Return`: Open terminal
- `Super+Space`: Application launcher
- `Super+Q`: Close window
- `Super+W`: Toggle floating mode
- `Super+F`: Toggle fullscreen
- `Super+1-9`: Switch workspaces
- `Super+Shift+1-9`: Move window to workspace

### System Tray
The system tray (right side of waybar) provides access to:
- Network manager
- Sound control (click to open pavucontrol)
- Notifications (SwayNC)

### Clipboard
- Clipboard history: `Super+V`
- Screenshots: Use grim/slurp or add screenshot keybindings

## Potential Issues and Solutions

### Missing Applications
If you had GNOME-specific applications you relied on:
- **Calculator**: Install `gnome-calculator` or use `qalculate-gtk`
- **System Monitor**: Use `btop`, `htop`, or install `gnome-system-monitor`
- **Archive Manager**: `file-roller` is included
- **Text Editor**: Use `neovim`, `vscode`, or install `gnome-text-editor`

### Theming Issues
If some applications don't look right:
- GTK theme is preserved (gruvbox-dark)
- For Qt applications, install `qt6ct` and configure themes
- Some GNOME applications may need `gsettings` adjustments

### Wayland Compatibility
Most applications should work, but if you encounter issues:
- Some older applications may need XWayland
- Check if apps have Wayland-specific flags
- Electron apps should work with the existing wayland.nix overlay

## Building and Applying Changes

To apply this configuration:

```bash
# Build the configuration
sudo nixos-rebuild switch --flake .#BlitzWing

# Or if you're testing first
sudo nixos-rebuild test --flake .#BlitzWing
```

## Customization

The Hyprland configuration is in `modules/desktop/hyprland/default.nix`. You can:
- Modify keybindings in the `bind` section
- Adjust window rules for specific applications
- Change colors, gaps, and animation settings
- Add more startup applications to `exec-once`

The Waybar configuration is included and can be customized for different modules and appearance.
38 changes: 3 additions & 35 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./modules/desktop/hyprland
];

# Bootloader.
Expand All @@ -25,12 +26,7 @@
networking.networkmanager.enable = true;
#dconf
programs.dconf.enable = true;
#xdg
xdg.portal = {
enable = true;
wlr.enable = true;
# extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
# XDG portal configuration is handled by the Hyprland module
# Set your time zone.
time.timeZone = "Asia/Kolkata";

Expand Down Expand Up @@ -114,17 +110,6 @@
lazygit
git
firefox
# GNOME applications and utilities
gnome-calculator # Calculator
gnome-characters # Character selector
gnome-color-manager # Color management
gnome-disk-utility # Disk management
gnome-system-monitor # System monitor
file-roller # Archive manager
gnome-terminal # Terminal
gnome-text-editor # Text editor
gnome-tweaks # GNOME tweaks
gnome-shell-extensions # GNOME extensions manager

# Keep some useful applications
kdiff3 # Compares and merges 2 or 3 files or directories
Expand All @@ -135,7 +120,6 @@
code-cursor
gsettings-desktop-schemas
gtk-engine-murrine # Required by many themes
gnome-themes-extra
gruvbox-dark-gtk
];

Expand Down Expand Up @@ -165,23 +149,7 @@
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
services.xserver = {
enable = true;
desktopManager.gnome = {
enable = true;
# This is the important part to make fractional scaling appear in the UI
extraGSettingsOverrides = ''
[org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer']
'';
# Ensure Mutter schemas are available for GSettings
extraGSettingsOverridePackages = [ pkgs.mutter ];
};
displayManager.gdm = {
enable = true;
wayland = true; # Crucial for modern Gnome HiDPI on Wayland
};
};
# These configurations are now handled by the Hyprland module
nix.settings.experimental-features = [ "nix-command" "flakes" ];
home-manager = {
backupFileExtension = "hm-bak";
Expand Down
7 changes: 1 addition & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs"; # Ensures HM uses the same nixpkgs
};
# Added firefox-gnome-theme as an input
firefox-gnome-theme = {
url = "github:rafaelmardojai/firefox-gnome-theme";
flake = false; # Important: Treat it as a legacy source tree, not a flake itself
};
};

outputs = { self, nixpkgs, home-manager, ... }@inputs: # @inputs captures all inputs
Expand All @@ -25,7 +20,7 @@
# to match your system's hostname.
nixosConfigurations.BlitzWing = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; }; # Makes all flake inputs (including firefox-gnome-theme) available
specialArgs = { inherit inputs; }; # Makes all flake inputs available

modules = [
# Import the Home Manager NixOS module
Expand Down
30 changes: 6 additions & 24 deletions home/san.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
home.homeDirectory = lib.mkForce "/home/san";

home.stateVersion = "25.05"; # Ensure this matches your NixOS/Home Manager version
home.file.".mozilla/firefox/default/chrome/firefox-gnome-theme" = {
source = inputs.firefox-gnome-theme;
recursive = true; # Important: copies/links the entire directory content
};

gtk = {
enable = true;
Expand Down Expand Up @@ -45,29 +41,22 @@
};
};

# This helps ensure GNOME and GTK4 applications respect the theme settings
# GTK and Qt theming settings
dconf.settings = {
"org/gnome/desktop/interface" = {
# FIXED: Using correct lowercase theme name "gruvbox-dark"
# Keep GTK theme settings for compatibility with GTK applications
gtk-theme = "gruvbox-dark";
icon-theme = "Gruvbox-Plus-Dark";
cursor-theme = "Bibata-Modern-Classic";
# ADDED: Modern color scheme preference for GTK4+ applications
# Modern color scheme preference for GTK4+ applications
color-scheme = "prefer-dark";
};

# ADDED: Additional GNOME settings for consistent theming
"org/gnome/desktop/wm/preferences" = {
# FIXED: Using correct lowercase theme name "gruvbox-dark"
theme = "gruvbox-dark";
};
};

# ADDED: Set environment variables for consistent theming across all applications
# Set environment variables for consistent theming across all applications
home.sessionVariables = {
# FIXED: Using correct lowercase theme name "gruvbox-dark"
GTK_THEME = "gruvbox-dark";
# ADDED: For Qt applications to use dark theme
# For Qt applications to use dark theme
QT_STYLE_OVERRIDE = "adwaita-dark";
};

Expand Down Expand Up @@ -108,14 +97,7 @@
"browser.tabs.drawInTitlebar" = true;
"svg.context-properties.content.enabled" = true;
};
userChrome = ''
@import "firefox-gnome-theme/userChrome.css";
@import "firefox-gnome-theme/theme/colors/dark.css"; /* Or your preferred color variant */
'';
# If the theme also provides userContent.css:
# userContent = ''
# @import "firefox-gnome-theme/userContent.css";
# '';
# Removed GNOME-specific theme
};
};
programs.home-manager.enable = true;
Expand Down
37 changes: 37 additions & 0 deletions modules/desktop/hyprland/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Basic configuration for Hyprland migration

This directory contains the Hyprland configuration module that replaces GNOME in your NixOS setup.

## Key Features

- **Window Manager**: Hyprland with tiling window management
- **Display Manager**: SDDM (replacing GDM)
- **Status Bar**: Waybar with system information
- **Application Launcher**: Rofi (Super+Space)
- **Notifications**: SwayNC
- **Screen Locker**: Hyprlock (can be added later)
- **Screenshot Tool**: Grimblast (can be added later)

## Key Keybindings

- `Super+Return`: Open terminal (ghostty)
- `Super+Space`: Application launcher (rofi)
- `Super+Q`: Close window
- `Super+W`: Toggle floating
- `Super+F`: Toggle fullscreen
- `Super+E`: File manager (nautilus)
- `Super+1-9`: Switch to workspace
- `Super+Shift+1-9`: Move window to workspace
- `Super+Arrow Keys`: Move focus between windows

## System Integration

- Volume and brightness keys work out of the box
- Network manager applet in system tray
- Clipboard history with cliphist
- Proper XDG portal setup for file dialogs
- Wayland environment variables configured

## Theme Compatibility

Your existing gruvbox-dark theme setup is preserved and will work with GTK applications running under Hyprland.
Loading