Updated README.md
This commit is contained in:
314
README.md
314
README.md
@@ -1,54 +1,37 @@
|
||||
# NixOS Configuration with Hyprland - UPDATED & FIXED
|
||||
# NixOS + Hyprland - Themed Configuration
|
||||
|
||||
## What's Different in This Version
|
||||
A beautiful, minimal NixOS configuration with Hyprland, inspired by vyrx-dev's dotfiles with Nord color scheme.
|
||||
|
||||
This is an **updated version** with all the fixes for compatibility with NixOS 25.05 and newer:
|
||||
## ✨ Features
|
||||
|
||||
### Fixed Issues:
|
||||
- ✅ Updated `hardware.opengl` → `hardware.graphics`
|
||||
- ✅ Removed deprecated `sound.enable`
|
||||
- ✅ Fixed `hardware.pulseaudio` → `services.pulseaudio`
|
||||
- ✅ Updated font packages: `nerdfonts` → `nerd-fonts.*`
|
||||
- ✅ Updated font names: `noto-fonts-cjk` → `noto-fonts-cjk-sans`
|
||||
- ✅ Fixed package names: `thunar` → `xfce.thunar`
|
||||
- ✅ Fixed Qt packages: `qt5ct` → `libsForQt5.qt5ct`, `qt6ct` → `kdePackages.qt6ct`
|
||||
- ✅ Updated Git config API: `userName/userEmail` → `settings.user.name/email`
|
||||
- ✅ Updated Kitty API: `theme` → `themeFile`
|
||||
- ✅ Removed duplicate XDG portal configuration (handled by Hyprland module)
|
||||
- ✅ Configured for both UEFI and BIOS/Legacy boot
|
||||
### 🎨 Theming
|
||||
- **Nord color scheme** throughout (blues, grays, pastels)
|
||||
- **Rofi** launcher with Nord theme
|
||||
- **Waybar** with custom Nord styling
|
||||
- **Kitty** terminal with Nord colors
|
||||
- **Auto-login** directly to Hyprland (no TTY login screen)
|
||||
|
||||
## Features
|
||||
### 🖥️ Desktop Environment
|
||||
- **Hyprland** - Dynamic tiling Wayland compositor
|
||||
- **Waybar** - Minimalist status bar
|
||||
- **Rofi** - Application launcher
|
||||
- **Swaync** - Notification center
|
||||
- **SWWW** - Wallpaper daemon
|
||||
|
||||
- **NixOS** with Flakes enabled for reproducible builds
|
||||
- **Hyprland** - Modern Wayland compositor with beautiful animations
|
||||
- **Home Manager** - Declarative user environment management
|
||||
- **Full Wayland Support** with XWayland fallback
|
||||
### 🛠️ Tools
|
||||
- **Kitty** - GPU-accelerated terminal
|
||||
- **Starship** - Minimal shell prompt
|
||||
- **ZSH** with Oh-My-Zsh
|
||||
- **Neovim, VSCode** - Text editors
|
||||
- **Modern CLI tools** - eza, bat, ripgrep, fzf
|
||||
|
||||
### Desktop Environment
|
||||
- **Waybar** - Highly customizable status bar
|
||||
- **Wofi** - Application launcher
|
||||
- **Dunst** - Notification daemon
|
||||
- **Hyprpaper** - Wallpaper manager
|
||||
- **SWWW** - Alternative animated wallpaper daemon
|
||||
## 🚀 Installation
|
||||
|
||||
### Tools & Applications
|
||||
- **Kitty & Alacritty** - Modern GPU-accelerated terminals
|
||||
- **ZSH** with Oh-My-Zsh - Enhanced shell experience
|
||||
- **Firefox** - Web browser
|
||||
- **VSCode** - Code editor
|
||||
- **Thunar** - File manager
|
||||
- **Modern CLI tools** - ripgrep, fd, bat, eza, fzf, etc.
|
||||
### Fresh NixOS Install:
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Method 1: Fresh NixOS Install (Two-Phase)
|
||||
|
||||
**Phase 1: Install Base NixOS**
|
||||
|
||||
1. Boot NixOS ISO
|
||||
2. Partition and format disk:
|
||||
```bash
|
||||
# For BIOS/Legacy (like Proxmox with legacy BIOS)
|
||||
# 1. Boot NixOS ISO and partition
|
||||
wipefs -a /dev/sda
|
||||
parted /dev/sda -- mklabel gpt
|
||||
parted /dev/sda -- mkpart primary 1MiB 2MiB
|
||||
parted /dev/sda -- set 1 bios_grub on
|
||||
@@ -61,117 +44,40 @@ mkfs.ext4 -L nixos /dev/sda3
|
||||
mount /dev/disk/by-label/nixos /mnt
|
||||
mkdir -p /mnt/boot
|
||||
mount /dev/disk/by-label/boot /mnt/boot
|
||||
```
|
||||
|
||||
3. Generate and edit config:
|
||||
```bash
|
||||
nixos-generate-config --root /mnt
|
||||
nano /mnt/etc/nixos/configuration.nix
|
||||
# Add bootloader config (see configuration.nix for example)
|
||||
```
|
||||
# 2. Clone this config
|
||||
nix-shell -p git --run "git clone https://git.cribdev.com/crib/nixos-config.git /mnt/etc/nixos"
|
||||
|
||||
4. Install and reboot:
|
||||
```bash
|
||||
nixos-install
|
||||
reboot
|
||||
```
|
||||
|
||||
**Phase 2: Apply Custom Configuration**
|
||||
|
||||
```bash
|
||||
# After rebooting into fresh NixOS
|
||||
nix-shell -p git
|
||||
git clone https://git.cribdev.com/crib/nixos-config.git ~/.config/nixos
|
||||
sudo cp /etc/nixos/hardware-configuration.nix ~/.config/nixos/
|
||||
|
||||
cd ~/.config/nixos
|
||||
# Edit hostname in flake.nix and configuration.nix
|
||||
# Edit username and other settings
|
||||
|
||||
sudo nixos-rebuild switch --flake .#YOUR-HOSTNAME
|
||||
reboot
|
||||
```
|
||||
|
||||
### Method 2: Direct Install with Flake (Advanced)
|
||||
|
||||
From the ISO after partitioning:
|
||||
|
||||
```bash
|
||||
nix-shell -p git
|
||||
git clone https://git.cribdev.com/crib/nixos-config.git /mnt/etc/nixos
|
||||
# 3. Generate hardware config
|
||||
nixos-generate-config --root /mnt --show-hardware-config > /mnt/etc/nixos/hardware-configuration.nix
|
||||
|
||||
# Edit configs
|
||||
nano /mnt/etc/nixos/flake.nix
|
||||
nano /mnt/etc/nixos/configuration.nix
|
||||
# 4. Install
|
||||
nixos-install --flake /mnt/etc/nixos#cribnix
|
||||
|
||||
# Install with flake
|
||||
nixos-install --flake /mnt/etc/nixos#YOUR-HOSTNAME
|
||||
# 5. Reboot
|
||||
reboot
|
||||
```
|
||||
|
||||
## File Structure
|
||||
You'll boot directly into Hyprland! No login screen needed.
|
||||
|
||||
```
|
||||
nixos-config/
|
||||
├── flake.nix # Main entry point
|
||||
├── configuration.nix # System-wide settings
|
||||
├── hardware-configuration.nix # Hardware-specific settings
|
||||
│
|
||||
├── modules/
|
||||
│ ├── system.nix # System packages and services
|
||||
│ └── hyprland.nix # Hyprland configuration
|
||||
│
|
||||
└── home/
|
||||
├── home.nix # User packages and settings
|
||||
├── hyprland.nix # Hyprland user config & keybindings
|
||||
└── waybar.nix # Status bar configuration
|
||||
```
|
||||
## ⌨️ Keybindings
|
||||
|
||||
## Configuration Checklist
|
||||
**Modifier Key:** `SUPER` (Windows key)
|
||||
|
||||
Before first build:
|
||||
|
||||
- [ ] Edit `flake.nix`: Change hostname from "myhost"
|
||||
- [ ] Edit `configuration.nix`:
|
||||
- Set hostname
|
||||
- Choose bootloader (GRUB for BIOS or systemd-boot for UEFI)
|
||||
- Set timezone
|
||||
- Update username from "crib" if needed
|
||||
- [ ] Edit `home/home.nix`:
|
||||
- Confirm username is correct
|
||||
- Set git name and email
|
||||
- Customize package list
|
||||
|
||||
## Bootloader Configuration
|
||||
|
||||
### For UEFI Systems:
|
||||
```nix
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
```
|
||||
|
||||
### For BIOS/Legacy Systems (Proxmox default):
|
||||
```nix
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
```
|
||||
|
||||
**Important:** Make sure your partitioning matches your bootloader choice!
|
||||
|
||||
## Hyprland Keybindings
|
||||
|
||||
Default modifier key: `SUPER` (Windows key)
|
||||
|
||||
### Basic
|
||||
### Applications
|
||||
- `SUPER + Return` - Terminal (Kitty)
|
||||
- `SUPER + D` - App launcher (Wofi)
|
||||
- `SUPER + D` - App Launcher (Rofi)
|
||||
- `SUPER + E` - File Manager (Thunar)
|
||||
|
||||
### Window Management
|
||||
- `SUPER + Q` - Close window
|
||||
- `SUPER + E` - File manager
|
||||
- `SUPER + V` - Toggle floating
|
||||
- `SUPER + F` - Fullscreen
|
||||
- `SUPER + J` - Toggle split
|
||||
- `SUPER + M` - Exit Hyprland
|
||||
|
||||
### Workspaces
|
||||
### Navigation
|
||||
- `SUPER + Arrow Keys` - Move focus
|
||||
- `SUPER + 1-9` - Switch workspace
|
||||
- `SUPER + SHIFT + 1-9` - Move window to workspace
|
||||
|
||||
@@ -179,55 +85,121 @@ Default modifier key: `SUPER` (Windows key)
|
||||
- `SUPER + SHIFT + S` - Screenshot to clipboard
|
||||
- `Print` - Screenshot to ~/Pictures
|
||||
|
||||
## Updating the System
|
||||
## 🎨 Customization
|
||||
|
||||
### Colors
|
||||
|
||||
The Nord theme uses these colors:
|
||||
- **Background:** `#2e3440` (dark gray-blue)
|
||||
- **Foreground:** `#eceff4` (light gray)
|
||||
- **Accent:** `#88c0d0` (frost blue)
|
||||
- **Red:** `#bf616a`
|
||||
- **Green:** `#a3be8c`
|
||||
- **Yellow:** `#ebcb8b`
|
||||
- **Blue:** `#81a1c1`
|
||||
|
||||
To change colors, edit:
|
||||
- `home/waybar.nix` - Status bar colors
|
||||
- `home/rofi.nix` - Launcher colors
|
||||
- `home/kitty.nix` - Terminal colors
|
||||
|
||||
### Wallpapers
|
||||
|
||||
Place your wallpapers in `~/Pictures/wallpapers/`:
|
||||
|
||||
```bash
|
||||
# Update flake inputs
|
||||
nix flake update
|
||||
mkdir -p ~/Pictures/wallpapers
|
||||
# Add your wallpapers here
|
||||
|
||||
# Rebuild
|
||||
sudo nixos-rebuild switch --flake ~/.config/nixos#YOUR-HOSTNAME
|
||||
|
||||
# Or use alias (after first build)
|
||||
update
|
||||
# Set wallpaper with swww
|
||||
swww img ~/Pictures/wallpapers/yourwallpaper.jpg
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
### Waybar
|
||||
|
||||
### Build Errors
|
||||
Customize the bar in `home/waybar.nix`:
|
||||
- Change modules order
|
||||
- Add/remove widgets
|
||||
- Adjust colors and styling
|
||||
|
||||
**"undefined variable 'X'"**
|
||||
- Package name has changed in newer NixOS
|
||||
- Check this fixed config for correct names
|
||||
### Rofi
|
||||
|
||||
**"wrong type for EFI System Partition"**
|
||||
- Bootloader mismatch - check your partitioning and bootloader config
|
||||
The launcher config is in `home/rofi.nix`:
|
||||
- Change window size
|
||||
- Adjust colors
|
||||
- Modify behavior
|
||||
|
||||
**"file exists" errors**
|
||||
- Likely duplicate configuration
|
||||
- Check for conflicting options in different files
|
||||
## 🔄 Updating
|
||||
|
||||
### Performance
|
||||
```bash
|
||||
# Update your config
|
||||
cd ~/.config/nixos
|
||||
git pull
|
||||
|
||||
**Slow first build?**
|
||||
- Use Hyprland cachix: `nix-shell -p cachix --run "cachix use hyprland"`
|
||||
- Allocate more RAM/CPU to VM if using Proxmox
|
||||
# Rebuild system
|
||||
sudo nixos-rebuild switch --flake .#cribnix
|
||||
|
||||
## Key Differences from Original Config
|
||||
# Or use the alias
|
||||
rebuild
|
||||
```
|
||||
|
||||
This version is specifically updated for:
|
||||
- NixOS 25.05 and newer
|
||||
- Proxmox VMs with legacy BIOS
|
||||
- Latest package names and APIs
|
||||
- Removed all deprecated options
|
||||
## 📁 File Structure
|
||||
|
||||
## Resources
|
||||
```
|
||||
nixos-config/
|
||||
├── flake.nix # Main flake
|
||||
├── configuration.nix # System config with auto-login
|
||||
├── hardware-configuration.nix
|
||||
├── modules/
|
||||
│ ├── system.nix # System packages
|
||||
│ └── hyprland.nix # Hyprland + Rofi setup
|
||||
└── home/
|
||||
├── home.nix # User config
|
||||
├── hyprland.nix # Hyprland settings & keybinds
|
||||
├── waybar.nix # Status bar (Nord themed)
|
||||
├── rofi.nix # Launcher (Nord themed)
|
||||
└── kitty.nix # Terminal (Nord themed)
|
||||
```
|
||||
|
||||
## 🎯 Key Features
|
||||
|
||||
### Auto-login
|
||||
- No login screen or greeter
|
||||
- Boots directly to Hyprland
|
||||
- Configured in `configuration.nix` with greetd
|
||||
|
||||
### Minimal & Fast
|
||||
- Clean aesthetic inspired by vyrx-dev
|
||||
- Smooth animations
|
||||
- Low resource usage
|
||||
|
||||
### Nord Theme
|
||||
- Cohesive color scheme across all apps
|
||||
- Easy to customize
|
||||
- Professional appearance
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Hyprland won't start
|
||||
```bash
|
||||
# Check logs
|
||||
journalctl -xe | grep -i hypr
|
||||
cat /tmp/hypr/*/hyprland.log
|
||||
```
|
||||
|
||||
### Want to disable auto-login?
|
||||
Edit `configuration.nix` and remove the `services.greetd` section, then rebuild.
|
||||
|
||||
### Colors not applying?
|
||||
Make sure you've rebooted after the initial install. Some theme settings require a fresh session.
|
||||
|
||||
## 📚 Resources
|
||||
|
||||
- [NixOS Manual](https://nixos.org/manual/nixos/stable/)
|
||||
- [Home Manager Manual](https://nix-community.github.io/home-manager/)
|
||||
- [Hyprland Wiki](https://wiki.hyprland.org/)
|
||||
- [NixOS Package Search](https://search.nixos.org/)
|
||||
- [Nord Theme](https://www.nordtheme.com/)
|
||||
- [vyrx-dev dotfiles](https://github.com/vyrx-dev/dotfiles) (inspiration)
|
||||
- [NixOS Manual](https://nixos.org/manual/nixos/stable/)
|
||||
|
||||
## License
|
||||
## 🎉 Enjoy!
|
||||
|
||||
Free to use and modify for your own needs.
|
||||
You now have a beautiful, themed Hyprland setup that auto-logs in and looks great out of the box. Customize it to make it your own!
|
||||
|
||||
Reference in New Issue
Block a user