Revamp README layout and content
Replace README with a reorganized, flake-focused document that adds a features overview, repository tree, flake inputs, step-by-step installation/rebuild/update instructions, and dedicated sections for desktop, gaming, development, services, and maintenance tips.
This commit is contained in:
259
README.md
259
README.md
@@ -1,112 +1,187 @@
|
||||
# atlas - NixOS configuration
|
||||
# 🐧 Atlas - NixOS Configuration
|
||||
|
||||
Personal NixOS desktop configuration built with **Nix flakes** for x86_64-linux. The setup is modular and targets a Wayland desktop (Niri + Ly) with PipeWire audio, AMD GPU support, and a curated set of apps and developer tooling.
|
||||
A modular, flake-based NixOS configuration for a desktop workstation optimized for gaming, development, and daily use.
|
||||
|
||||
## Highlights
|
||||
## ✨ Features
|
||||
|
||||
- **Wayland desktop**: Niri compositor, Ly display manager, portals, Polkit agent
|
||||
- **Audio**: PipeWire (ALSA, PulseAudio, JACK)
|
||||
- **AMD GPU stack**: Vulkan, VA-API, CoreCtrl
|
||||
- **Developer tooling**: Docker, Rust, Node.js, Python
|
||||
- **Extras**: Steam/Gaming, virtualization, theming, Navidrome
|
||||
- **🎮 Gaming-Ready**: Steam, Proton-GE, Lutris, Heroic, Gamemode with AMD GPU optimizations
|
||||
- **🖥️ Wayland-Native**: Niri compositor with modern Wayland tooling
|
||||
- **⚡ Performance**: CachyOS kernel with scx_lavd scheduler for low-latency
|
||||
- **🛠️ Development**: Docker, Node.js, Rust, Python, and modern CLI tools
|
||||
- **🎨 Theming**: Adwaita dark theme, Papirus icons, JetBrains Mono fonts
|
||||
- **🎵 Media**: Navidrome music server, PipeWire audio stack
|
||||
|
||||
## Prerequisites
|
||||
## 📁 Structure
|
||||
|
||||
- A **recent NixOS installer ISO** with flake support
|
||||
- **x86_64-linux** hardware (this flake is pinned to that system)
|
||||
- Basic familiarity with the NixOS installation process
|
||||
|
||||
> This is a personal configuration. Expect to adjust the hostname, user, and hardware modules for your machine.
|
||||
|
||||
## Installation (fresh NixOS install)
|
||||
|
||||
1. **Download and boot the NixOS graphical installer**
|
||||
- <https://nixos.org/download.html>
|
||||
|
||||
2. **Follow the graphical installer**
|
||||
- Partition your drives as needed
|
||||
- Create your user account
|
||||
- When prompted for desktop environment, select **No desktop**
|
||||
- Complete the installation
|
||||
|
||||
3. **Reboot and log in** to your new shell-only NixOS system
|
||||
|
||||
4. **Clone this repository**
|
||||
|
||||
```sh
|
||||
git clone https://github.com/ragusa-it/nixos ~/nixos
|
||||
```
|
||||
|
||||
5. **Copy your hardware configuration into the repo**
|
||||
|
||||
```sh
|
||||
cp /etc/nixos/hardware-configuration.nix ~/nixos/hardware-configuration.nix
|
||||
```
|
||||
|
||||
6. **Review and customize**
|
||||
|
||||
- `configuration.nix`
|
||||
- `networking.hostName`
|
||||
- `users.users.pinj` (change username/groups as needed)
|
||||
- `modules/gpu-amd.nix` if you are **not** on AMD hardware
|
||||
|
||||
7. **Rebuild with the flake**
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch --flake ~/nixos#nixos
|
||||
```
|
||||
|
||||
8. **Reboot** to start the full desktop environment
|
||||
|
||||
```sh
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
## Post-install rebuilds
|
||||
|
||||
From inside the cloned repository:
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch --flake .#nixos
|
||||
```
|
||||
nixos/
|
||||
├── flake.nix # Flake definition with inputs
|
||||
├── flake.lock # Locked dependencies
|
||||
├── configuration.nix # Main config (imports modules)
|
||||
├── hardware-configuration.nix # Hardware-specific config
|
||||
├── modules/
|
||||
│ ├── apps.nix # User applications (media, productivity, communication)
|
||||
│ ├── audio.nix # Bluetooth and audio controls
|
||||
│ ├── desktop.nix # Wayland, portals, polkit, desktop utilities
|
||||
│ ├── dev.nix # Docker, languages, build tools, CLI utilities
|
||||
│ ├── gaming.nix # Steam, Gamemode, Lutris, Wine/Proton
|
||||
│ ├── gpu-amd.nix # AMD drivers, Vulkan, VA-API, CoreCtrl
|
||||
│ ├── navidrome.nix # Music streaming server
|
||||
│ ├── power.nix # Power management, CPU governors
|
||||
│ ├── services.nix # System services (fstrim, zram, avahi)
|
||||
│ ├── shell.nix # Fish shell configuration
|
||||
│ ├── theming.nix # Fonts, GTK/Qt themes, cursors
|
||||
│ └── virtualization.nix # QEMU, KVM, virt-manager
|
||||
└── .config/ # Dotfiles for user applications
|
||||
```
|
||||
|
||||
Use `boot` if you want to schedule the change for the next reboot:
|
||||
## 🚀 Flake Inputs
|
||||
|
||||
```sh
|
||||
| Input | Description |
|
||||
|-------|-------------|
|
||||
| `nixpkgs` | NixOS unstable channel |
|
||||
| `nix-cachyos-kernel` | CachyOS optimized kernel |
|
||||
| `noctalia` | Noctalia shell |
|
||||
| `zen-browser` | Zen Browser |
|
||||
| `ghostty` | Ghostty terminal emulator |
|
||||
| `opencode` | OpenCode |
|
||||
| `vicinae` | Vicinae launcher |
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- NixOS installed with flakes enabled
|
||||
- AMD GPU (configuration is AMD-specific)
|
||||
|
||||
### Steps
|
||||
|
||||
1. **Clone this repository:**
|
||||
```bash
|
||||
git clone https://github.com/yourusername/nixos.git /etc/nixos
|
||||
```
|
||||
|
||||
2. **Generate hardware configuration:**
|
||||
```bash
|
||||
sudo nixos-generate-config --show-hardware-config > /etc/nixos/hardware-configuration.nix
|
||||
```
|
||||
|
||||
3. **Update the user configuration** in `configuration.nix`:
|
||||
- Change `users.users.pinj` to your username
|
||||
- Update `networking.hostName` if desired
|
||||
- Adjust timezone in `time.timeZone`
|
||||
|
||||
4. **Rebuild the system:**
|
||||
```bash
|
||||
sudo nixos-rebuild switch --flake .#nixos
|
||||
```
|
||||
|
||||
5. **Set up Flathub** (after first boot):
|
||||
```bash
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
```
|
||||
|
||||
## 🔧 Usage
|
||||
|
||||
### Rebuild System
|
||||
|
||||
```bash
|
||||
# Test configuration without switching
|
||||
sudo nixos-rebuild test --flake .#nixos
|
||||
|
||||
# Switch to new configuration
|
||||
sudo nixos-rebuild switch --flake .#nixos
|
||||
|
||||
# Build and set as boot default (without switching)
|
||||
sudo nixos-rebuild boot --flake .#nixos
|
||||
```
|
||||
|
||||
## Updating the system
|
||||
### Update Flake Inputs
|
||||
|
||||
```sh
|
||||
```bash
|
||||
# Update all inputs
|
||||
nix flake update
|
||||
sudo nixos-rebuild switch --flake .#nixos
|
||||
|
||||
# Update specific input
|
||||
nix flake lock --update-input nixpkgs
|
||||
```
|
||||
|
||||
## Repository layout
|
||||
### Garbage Collection
|
||||
|
||||
- `flake.nix` - Flake inputs, binary caches, and system definition
|
||||
- `configuration.nix` - Main NixOS entry point (imports modules)
|
||||
- `hardware-configuration.nix` - Machine-specific hardware config (replace on install)
|
||||
- `modules/` - Modular system features
|
||||
- `desktop.nix` - portals, Polkit agent, swaylock, swayidle
|
||||
- `gpu-amd.nix` - AMD GPU stack
|
||||
- `audio.nix` - PipeWire and Bluetooth
|
||||
- `apps.nix` - user applications
|
||||
- `dev.nix` - developer tooling
|
||||
- `gaming.nix` - Steam, Lutris, Gamemode
|
||||
- `theming.nix` - fonts, themes, cursors
|
||||
- `virtualization.nix` - QEMU/KVM/virt-manager
|
||||
- `power.nix` - power management
|
||||
- `shell.nix` - Fish shell configuration
|
||||
- `services.nix` - system services (fstrim, zram, avahi)
|
||||
- `navidrome.nix` - self-hosted music server
|
||||
Automatic garbage collection is configured weekly, but you can run it manually:
|
||||
|
||||
## Troubleshooting
|
||||
```bash
|
||||
# Collect garbage older than 14 days
|
||||
sudo nix-collect-garbage --delete-older-than 14d
|
||||
|
||||
- **Flakes not enabled**: if `nixos-rebuild` fails, prefix the command with `NIX_CONFIG="experimental-features = nix-command flakes"` or enable flakes in `/etc/nix/nix.conf`.
|
||||
- **Wrong hardware configuration**: regenerate with `sudo nixos-generate-config` and copy the new `hardware-configuration.nix` into the repo.
|
||||
# Optimize store
|
||||
nix-store --optimise
|
||||
```
|
||||
|
||||
## License
|
||||
## 🖥️ Desktop Environment
|
||||
|
||||
No license is specified. If you plan to reuse this configuration, please open an issue to discuss licensing.
|
||||
- **Compositor**: Niri (scrollable tiling Wayland compositor)
|
||||
- **Display Manager**: Ly
|
||||
- **Launcher**: Vicinae
|
||||
- **Terminal**: Ghostty
|
||||
- **Browser**: Zen Browser, Firefox
|
||||
- **File Manager**: Nautilus
|
||||
|
||||
## 🎮 Gaming
|
||||
|
||||
The gaming module provides:
|
||||
|
||||
- **Steam** with Proton-GE for enhanced Windows game compatibility
|
||||
- **Gamemode** for automatic performance optimizations
|
||||
- **Lutris** for non-Steam games
|
||||
- **Heroic** for Epic Games and GOG
|
||||
- **Gamescope** micro-compositor for problematic games
|
||||
- **MangoHud** (via dotfiles) for in-game overlays
|
||||
|
||||
### AMD GPU Optimizations
|
||||
|
||||
- CoreCtrl for fan curves and overclocking
|
||||
- Full power management features enabled
|
||||
- RADV (Mesa Vulkan) driver
|
||||
- VA-API hardware video acceleration
|
||||
|
||||
## 🛠️ Development
|
||||
|
||||
Included tools:
|
||||
|
||||
- **Languages**: Node.js 22, Python 3, Rust (via rustup), Bun
|
||||
- **Containers**: Docker with auto-prune, docker-compose, lazydocker
|
||||
- **Git**: lazygit, gh (GitHub CLI), delta (better diffs)
|
||||
- **CLI**: ripgrep, fd, fzf, eza, bat, jq, yq, and more
|
||||
- **Editors**: Zed, VS Code (config), micro
|
||||
|
||||
## 🎵 Audio & Media
|
||||
|
||||
- **Audio Stack**: PipeWire with JACK support
|
||||
- **Bluetooth**: Enabled with experimental features
|
||||
- **Music Server**: Navidrome for self-hosted streaming
|
||||
- **Music Client**: Feishin
|
||||
- **Video**: MPV, Celluloid, OBS Studio
|
||||
|
||||
## ⚙️ Key Services
|
||||
|
||||
| Service | Description |
|
||||
|---------|-------------|
|
||||
| Tailscale | Mesh VPN |
|
||||
| OpenSSH | Remote access |
|
||||
| Navidrome | Music streaming server |
|
||||
| Avahi | Local network discovery |
|
||||
| Profile-sync-daemon | Browser profile in tmpfs |
|
||||
| ZRAM | Compressed swap in RAM |
|
||||
|
||||
## 📝 Notes
|
||||
|
||||
- **Kernel**: Uses CachyOS kernel with x86_64-v3 optimizations
|
||||
- **Scheduler**: scx_lavd for low-latency gaming performance
|
||||
- **Shell**: Fish is the default shell (Zsh available as fallback)
|
||||
- **Unfree packages**: Enabled (Steam, Discord, etc.)
|
||||
- **State Version**: 26.05
|
||||
|
||||
## 📄 License
|
||||
|
||||
This configuration is provided as-is for personal use and reference.
|
||||
Reference in New Issue
Block a user