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:
|
### 🎨 Theming
|
||||||
- ✅ Updated `hardware.opengl` → `hardware.graphics`
|
- **Nord color scheme** throughout (blues, grays, pastels)
|
||||||
- ✅ Removed deprecated `sound.enable`
|
- **Rofi** launcher with Nord theme
|
||||||
- ✅ Fixed `hardware.pulseaudio` → `services.pulseaudio`
|
- **Waybar** with custom Nord styling
|
||||||
- ✅ Updated font packages: `nerdfonts` → `nerd-fonts.*`
|
- **Kitty** terminal with Nord colors
|
||||||
- ✅ Updated font names: `noto-fonts-cjk` → `noto-fonts-cjk-sans`
|
- **Auto-login** directly to Hyprland (no TTY login screen)
|
||||||
- ✅ 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
|
|
||||||
|
|
||||||
## 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
|
### 🛠️ Tools
|
||||||
- **Hyprland** - Modern Wayland compositor with beautiful animations
|
- **Kitty** - GPU-accelerated terminal
|
||||||
- **Home Manager** - Declarative user environment management
|
- **Starship** - Minimal shell prompt
|
||||||
- **Full Wayland Support** with XWayland fallback
|
- **ZSH** with Oh-My-Zsh
|
||||||
|
- **Neovim, VSCode** - Text editors
|
||||||
|
- **Modern CLI tools** - eza, bat, ripgrep, fzf
|
||||||
|
|
||||||
### Desktop Environment
|
## 🚀 Installation
|
||||||
- **Waybar** - Highly customizable status bar
|
|
||||||
- **Wofi** - Application launcher
|
|
||||||
- **Dunst** - Notification daemon
|
|
||||||
- **Hyprpaper** - Wallpaper manager
|
|
||||||
- **SWWW** - Alternative animated wallpaper daemon
|
|
||||||
|
|
||||||
### Tools & Applications
|
### Fresh NixOS Install:
|
||||||
- **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.
|
|
||||||
|
|
||||||
## Quick Start
|
|
||||||
|
|
||||||
### Method 1: Fresh NixOS Install (Two-Phase)
|
|
||||||
|
|
||||||
**Phase 1: Install Base NixOS**
|
|
||||||
|
|
||||||
1. Boot NixOS ISO
|
|
||||||
2. Partition and format disk:
|
|
||||||
```bash
|
```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 -- mklabel gpt
|
||||||
parted /dev/sda -- mkpart primary 1MiB 2MiB
|
parted /dev/sda -- mkpart primary 1MiB 2MiB
|
||||||
parted /dev/sda -- set 1 bios_grub on
|
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
|
mount /dev/disk/by-label/nixos /mnt
|
||||||
mkdir -p /mnt/boot
|
mkdir -p /mnt/boot
|
||||||
mount /dev/disk/by-label/boot /mnt/boot
|
mount /dev/disk/by-label/boot /mnt/boot
|
||||||
```
|
|
||||||
|
|
||||||
3. Generate and edit config:
|
# 2. Clone this config
|
||||||
```bash
|
nix-shell -p git --run "git clone https://git.cribdev.com/crib/nixos-config.git /mnt/etc/nixos"
|
||||||
nixos-generate-config --root /mnt
|
|
||||||
nano /mnt/etc/nixos/configuration.nix
|
|
||||||
# Add bootloader config (see configuration.nix for example)
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Install and reboot:
|
# 3. Generate hardware config
|
||||||
```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
|
|
||||||
nixos-generate-config --root /mnt --show-hardware-config > /mnt/etc/nixos/hardware-configuration.nix
|
nixos-generate-config --root /mnt --show-hardware-config > /mnt/etc/nixos/hardware-configuration.nix
|
||||||
|
|
||||||
# Edit configs
|
# 4. Install
|
||||||
nano /mnt/etc/nixos/flake.nix
|
nixos-install --flake /mnt/etc/nixos#cribnix
|
||||||
nano /mnt/etc/nixos/configuration.nix
|
|
||||||
|
|
||||||
# Install with flake
|
# 5. Reboot
|
||||||
nixos-install --flake /mnt/etc/nixos#YOUR-HOSTNAME
|
|
||||||
reboot
|
reboot
|
||||||
```
|
```
|
||||||
|
|
||||||
## File Structure
|
You'll boot directly into Hyprland! No login screen needed.
|
||||||
|
|
||||||
```
|
## ⌨️ Keybindings
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration Checklist
|
**Modifier Key:** `SUPER` (Windows key)
|
||||||
|
|
||||||
Before first build:
|
### Applications
|
||||||
|
|
||||||
- [ ] 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
|
|
||||||
- `SUPER + Return` - Terminal (Kitty)
|
- `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 + Q` - Close window
|
||||||
- `SUPER + E` - File manager
|
|
||||||
- `SUPER + V` - Toggle floating
|
- `SUPER + V` - Toggle floating
|
||||||
- `SUPER + F` - Fullscreen
|
- `SUPER + F` - Fullscreen
|
||||||
|
- `SUPER + J` - Toggle split
|
||||||
|
- `SUPER + M` - Exit Hyprland
|
||||||
|
|
||||||
### Workspaces
|
### Navigation
|
||||||
|
- `SUPER + Arrow Keys` - Move focus
|
||||||
- `SUPER + 1-9` - Switch workspace
|
- `SUPER + 1-9` - Switch workspace
|
||||||
- `SUPER + SHIFT + 1-9` - Move window to 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
|
- `SUPER + SHIFT + S` - Screenshot to clipboard
|
||||||
- `Print` - Screenshot to ~/Pictures
|
- `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
|
```bash
|
||||||
# Update flake inputs
|
mkdir -p ~/Pictures/wallpapers
|
||||||
nix flake update
|
# Add your wallpapers here
|
||||||
|
|
||||||
# Rebuild
|
# Set wallpaper with swww
|
||||||
sudo nixos-rebuild switch --flake ~/.config/nixos#YOUR-HOSTNAME
|
swww img ~/Pictures/wallpapers/yourwallpaper.jpg
|
||||||
|
|
||||||
# Or use alias (after first build)
|
|
||||||
update
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
### Waybar
|
||||||
|
|
||||||
### Build Errors
|
Customize the bar in `home/waybar.nix`:
|
||||||
|
- Change modules order
|
||||||
|
- Add/remove widgets
|
||||||
|
- Adjust colors and styling
|
||||||
|
|
||||||
**"undefined variable 'X'"**
|
### Rofi
|
||||||
- Package name has changed in newer NixOS
|
|
||||||
- Check this fixed config for correct names
|
|
||||||
|
|
||||||
**"wrong type for EFI System Partition"**
|
The launcher config is in `home/rofi.nix`:
|
||||||
- Bootloader mismatch - check your partitioning and bootloader config
|
- Change window size
|
||||||
|
- Adjust colors
|
||||||
|
- Modify behavior
|
||||||
|
|
||||||
**"file exists" errors**
|
## 🔄 Updating
|
||||||
- Likely duplicate configuration
|
|
||||||
- Check for conflicting options in different files
|
|
||||||
|
|
||||||
### Performance
|
```bash
|
||||||
|
# Update your config
|
||||||
|
cd ~/.config/nixos
|
||||||
|
git pull
|
||||||
|
|
||||||
**Slow first build?**
|
# Rebuild system
|
||||||
- Use Hyprland cachix: `nix-shell -p cachix --run "cachix use hyprland"`
|
sudo nixos-rebuild switch --flake .#cribnix
|
||||||
- Allocate more RAM/CPU to VM if using Proxmox
|
|
||||||
|
|
||||||
## Key Differences from Original Config
|
# Or use the alias
|
||||||
|
rebuild
|
||||||
|
```
|
||||||
|
|
||||||
This version is specifically updated for:
|
## 📁 File Structure
|
||||||
- NixOS 25.05 and newer
|
|
||||||
- Proxmox VMs with legacy BIOS
|
|
||||||
- Latest package names and APIs
|
|
||||||
- Removed all deprecated options
|
|
||||||
|
|
||||||
## 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/)
|
- [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