150 lines
3.1 KiB
Markdown
150 lines
3.1 KiB
Markdown
# Quick Setup Guide
|
|
|
|
## Initial Setup on Fresh NixOS Installation
|
|
|
|
### Method 1: One-Line Bootstrap (Recommended)
|
|
|
|
```bash
|
|
nix-shell -p git --run "bash <(curl -s https://git.cribdev.com/raw/YOUR-USERNAME/nixos-config/main/bootstrap.sh)"
|
|
```
|
|
|
|
Replace `YOUR-USERNAME` with your actual git username.
|
|
|
|
### Method 2: Manual Setup
|
|
|
|
1. **Install git temporarily:**
|
|
```bash
|
|
nix-shell -p git
|
|
```
|
|
|
|
2. **Clone your configuration:**
|
|
```bash
|
|
git clone https://git.cribdev.com/YOUR-USERNAME/nixos-config ~/.config/nixos
|
|
cd ~/.config/nixos
|
|
```
|
|
|
|
3. **Copy hardware configuration:**
|
|
```bash
|
|
sudo cp /etc/nixos/hardware-configuration.nix ~/.config/nixos/
|
|
```
|
|
|
|
4. **Edit configuration files:**
|
|
- Open `flake.nix` and replace:
|
|
- `myhost` with your hostname
|
|
- `yourusername` with your username
|
|
|
|
- Open `configuration.nix` and set:
|
|
- `networking.hostName`
|
|
- `time.timeZone`
|
|
- User account details
|
|
|
|
- Open `home/home.nix` and set:
|
|
- Git username and email
|
|
- Any other personal preferences
|
|
|
|
5. **Build and apply:**
|
|
```bash
|
|
sudo nixos-rebuild switch --flake ~/.config/nixos#YOURHOSTNAME
|
|
```
|
|
|
|
6. **Reboot:**
|
|
```bash
|
|
reboot
|
|
```
|
|
|
|
## Post-Installation
|
|
|
|
### Add a Wallpaper
|
|
```bash
|
|
mkdir -p ~/wallpapers
|
|
# Copy your wallpaper to ~/wallpapers/default.jpg
|
|
```
|
|
|
|
### Test Hyprland
|
|
After reboot, you should be greeted with a login manager. Log in and Hyprland should start automatically.
|
|
|
|
### Useful First Commands
|
|
```bash
|
|
# Open terminal: SUPER + Return
|
|
# Open app launcher: SUPER + D
|
|
# Open file manager: SUPER + E
|
|
```
|
|
|
|
## Pushing to Your Git Server
|
|
|
|
### First Time Setup
|
|
|
|
1. **Initialize git (if not already done):**
|
|
```bash
|
|
cd ~/.config/nixos
|
|
git init
|
|
git add .
|
|
git commit -m "Initial NixOS configuration"
|
|
```
|
|
|
|
2. **Add your remote:**
|
|
```bash
|
|
git remote add origin https://git.cribdev.com/YOUR-USERNAME/nixos-config.git
|
|
```
|
|
|
|
3. **Push to your server:**
|
|
```bash
|
|
git push -u origin main
|
|
```
|
|
|
|
### Updating Your Configuration
|
|
|
|
After making changes:
|
|
|
|
```bash
|
|
cd ~/.config/nixos
|
|
git add .
|
|
git commit -m "Description of changes"
|
|
git push
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### "Hardware configuration not found"
|
|
Generate it with:
|
|
```bash
|
|
sudo nixos-generate-config --show-hardware-config > ~/.config/nixos/hardware-configuration.nix
|
|
```
|
|
|
|
### "Flake inputs need to be updated"
|
|
```bash
|
|
cd ~/.config/nixos
|
|
nix flake update
|
|
sudo nixos-rebuild switch --flake .#YOURHOSTNAME
|
|
```
|
|
|
|
### Hyprland doesn't start
|
|
Check logs:
|
|
```bash
|
|
journalctl -xe
|
|
cat /tmp/hypr/*/hyprland.log
|
|
```
|
|
|
|
## What You Get
|
|
|
|
✅ Full Wayland desktop with Hyprland
|
|
✅ Beautiful animations and effects
|
|
✅ Waybar status bar
|
|
✅ Wofi application launcher
|
|
✅ Dunst notifications
|
|
✅ Screenshot tools (grim + slurp)
|
|
✅ Modern terminal (Kitty)
|
|
✅ Essential CLI tools
|
|
✅ Development environment ready
|
|
✅ Fully reproducible system
|
|
|
|
## Next Steps
|
|
|
|
- Customize Waybar appearance in `home/waybar.nix`
|
|
- Adjust Hyprland settings in `home/hyprland.nix`
|
|
- Add more packages in `home/home.nix` or `modules/system.nix`
|
|
- Set up your wallpapers
|
|
- Configure your applications
|
|
|
|
Enjoy your new NixOS + Hyprland setup! 🎉
|