Update README based on actual .nix configuration
- Analyzed all .nix files to ensure accuracy - Added missing flake inputs (zen-browser, opencode) - Updated features section with accurate details - Rewrote structure section to match actual modules - Updated desktop environment with Noctalia shell - Removed nix profile instructions (all packages are system-wide) - Added accurate package management section - Updated gaming section with Faugus Launcher - Fixed office suite (OnlyOffice instead of LibreOffice) - Updated bootloader (Limine with Secure Boot) - Added comprehensive system details and configuration features - Added secondary storage mounts - Updated services with earlyoom, plocate, fwupd - Added Fish shell aliases reference - Removed outdated user profile installation instructions - Updated all sections to reflect actual implementation Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
This commit is contained in:
279
README.md
279
README.md
@@ -4,12 +4,13 @@ A modular, flake-based NixOS configuration for a desktop workstation optimized f
|
||||
|
||||
## ✨ Features
|
||||
|
||||
- **🎮 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
|
||||
- **🎮 Gaming-Ready**: Steam with Proton-GE, Lutris, Heroic, Faugus Launcher, Gamemode with AMD GPU optimizations
|
||||
- **🖥️ Wayland-Native**: Niri compositor with Noctalia shell and modern Wayland tooling
|
||||
- **⚡ Performance**: CachyOS kernel (x86_64-v3) with scx_lavd scheduler for low-latency gaming
|
||||
- **🛠️ Development**: Docker, Node.js 22, Rust (rustup), Python 3, Bun, and modern CLI tools
|
||||
- **🎨 Theming**: Adwaita dark theme, Papirus icons, JetBrains Mono & Inter fonts
|
||||
- **🎵 Media**: Navidrome music server, PipeWire audio with JACK support, full Bluetooth codec support
|
||||
- **🔒 Security**: Secure Boot with Limine bootloader
|
||||
|
||||
## 📁 Structure
|
||||
|
||||
@@ -17,22 +18,21 @@ A modular, flake-based NixOS configuration for a desktop workstation optimized f
|
||||
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
|
||||
├── configuration.nix # Main config (boot, networking, user, localization)
|
||||
├── hardware-configuration.nix # Auto-generated hardware config (don't edit)
|
||||
└── modules/
|
||||
├── apps.nix # User applications (media, productivity, communication)
|
||||
├── audio.nix # PipeWire, Bluetooth codecs, audio controls
|
||||
├── desktop.nix # Wayland, XDG portals, polkit, Vicinae launcher
|
||||
├── dev.nix # Docker, languages, build tools, CLI utilities
|
||||
├── gaming.nix # Steam, Gamemode, launchers, Wine/Proton
|
||||
├── gpu-amd.nix # AMD drivers, Vulkan, VA-API, CoreCtrl
|
||||
├── navidrome.nix # Music streaming server
|
||||
├── power.nix # Power profiles daemon, CPU governor
|
||||
├── services.nix # System services (fstrim, zram, avahi, psd, earlyoom)
|
||||
├── shell.nix # Fish shell config with plugins and aliases
|
||||
├── theming.nix # Fonts, GTK/Qt themes, cursors, dconf
|
||||
└── virtualization.nix # QEMU, KVM, virt-manager (commented out)
|
||||
```
|
||||
|
||||
## 🚀 Flake Inputs
|
||||
@@ -40,22 +40,25 @@ nixos/
|
||||
| Input | Description |
|
||||
|-------|-------------|
|
||||
| `nixpkgs` | NixOS unstable channel |
|
||||
| `nix-cachyos-kernel` | CachyOS optimized kernel |
|
||||
| `noctalia` | Noctalia shell |
|
||||
| `vicinae` | Vicinae launcher |
|
||||
| `nix-cachyos-kernel` | CachyOS optimized kernel with x86_64-v3 |
|
||||
| `noctalia` | Noctalia desktop shell |
|
||||
| `vicinae` | Vicinae application launcher |
|
||||
| `zen-browser` | Zen Browser (Firefox-based) |
|
||||
| `opencode` | OpenCode AI coding assistant |
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- NixOS installed with flakes enabled
|
||||
- AMD GPU (configuration is AMD-specific)
|
||||
- AMD CPU and GPU (configuration includes AMD-specific optimizations)
|
||||
- UEFI system (for Secure Boot support)
|
||||
|
||||
### Steps
|
||||
|
||||
1. **Clone this repository:**
|
||||
```bash
|
||||
git clone https://github.com/yourusername/nixos.git /etc/nixos
|
||||
git clone https://github.com/ragusa-it/nixos.git /etc/nixos
|
||||
```
|
||||
|
||||
2. **Generate hardware configuration:**
|
||||
@@ -63,21 +66,28 @@ nixos/
|
||||
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`
|
||||
3. **Update the configuration:**
|
||||
- In `flake.nix`: Change `username = "pinj"` to your username
|
||||
- In `configuration.nix`:
|
||||
- Update `networking.hostName` if desired
|
||||
- Adjust `time.timeZone` (currently "Europe/Berlin")
|
||||
- Review and adjust locale settings
|
||||
- Update secondary storage mount points or remove them
|
||||
- Review keyboard layout (currently German)
|
||||
|
||||
4. **Rebuild the system:**
|
||||
```bash
|
||||
sudo nixos-rebuild switch --flake .#nixos
|
||||
```
|
||||
|
||||
5. **Set up Flathub** (after first boot):
|
||||
5. **(Optional) Set up Secure Boot:**
|
||||
```bash
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
sudo sbctl create-keys
|
||||
sudo sbctl enroll-keys -m
|
||||
```
|
||||
|
||||
6. **Flatpak is auto-configured** - Flathub repository is automatically added on system activation
|
||||
|
||||
## 🔧 Usage
|
||||
|
||||
### Rebuild System
|
||||
@@ -103,16 +113,14 @@ nix flake update
|
||||
nix flake lock --update-input nixpkgs
|
||||
```
|
||||
|
||||
### Update User Apps
|
||||
|
||||
GUI applications and fast-updating tools are managed via `nix profile` for instant updates without system rebuilds:
|
||||
### Search and Install Packages
|
||||
|
||||
```bash
|
||||
# Update all user apps
|
||||
update-apps
|
||||
# Search for packages
|
||||
nix search nixpkgs <package-name>
|
||||
|
||||
# List installed user apps
|
||||
list-apps
|
||||
# Aliases available in Fish shell
|
||||
search <package-name> # Same as above
|
||||
```
|
||||
|
||||
### Garbage Collection
|
||||
@@ -130,128 +138,147 @@ nix-store --optimise
|
||||
## 🖥️ Desktop Environment
|
||||
|
||||
- **Compositor**: Niri (scrollable tiling Wayland compositor)
|
||||
- **Display Manager**: Ly
|
||||
- **Launcher**: Vicinae
|
||||
- **Shell**: Noctalia (desktop shell for Niri)
|
||||
- **Display Manager**: Ly (TUI display manager)
|
||||
- **Launcher**: Vicinae (application launcher)
|
||||
- **Terminal**: Ghostty
|
||||
- **Browser**: Zen Browser, Firefox
|
||||
- **File Manager**: Nautilus
|
||||
- **Browser**: Zen Browser (primary), Firefox
|
||||
- **File Manager**: Nautilus (GNOME Files)
|
||||
- **Editors**: Zed Editor, Claude Code, OpenCode
|
||||
|
||||
## 🎮 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
|
||||
- **Gamemode** for automatic CPU/GPU performance optimizations
|
||||
- **Game Launchers**: Lutris, Heroic (Epic/GOG), Faugus Launcher
|
||||
- **Wine Support**: Wine Staging with Winetricks and Protontricks
|
||||
- **Gamescope** micro-compositor for fixing problematic games
|
||||
- **Kernel Tweaks**: Increased inotify watchers, optimized swap settings
|
||||
|
||||
### AMD GPU Optimizations
|
||||
|
||||
- CoreCtrl for fan curves and overclocking
|
||||
- Full power management features enabled
|
||||
- RADV (Mesa Vulkan) driver
|
||||
- VA-API hardware video acceleration
|
||||
- **CoreCtrl** for fan curves, overclocking, and GPU monitoring
|
||||
- Full power management features enabled (`amdgpu.ppfeaturemask=0xffffffff`)
|
||||
- **RADV** (Mesa Vulkan) driver - best for gaming
|
||||
- **VA-API** hardware video acceleration (decode/encode)
|
||||
- **Monitoring Tools**: radeontop, nvtop (AMD edition)
|
||||
- **Vulkan Tools**: vulkan-tools, vulkan-loader for debugging
|
||||
|
||||
## 🛠️ Development
|
||||
|
||||
Included tools:
|
||||
|
||||
- **Languages**: Node.js 22, Python 3, Rust (via rustup), Bun
|
||||
- **Containers**: Docker with auto-prune, docker-compose
|
||||
- **Git**: gh (GitHub CLI), delta (better diffs)
|
||||
- **CLI**: ripgrep, fd, fzf, eza, bat, jq, yq, and more
|
||||
- **Editors**: micro (system), Zed (user profile)
|
||||
|
||||
*Additional dev tools via user profile: lazygit, lazydocker, dbeaver, httpie*
|
||||
- **Containers**: Docker with weekly auto-prune, Docker Compose
|
||||
- **Environment Management**: direnv with nix-direnv for per-project environments
|
||||
- **Build Tools**: gcc, gnumake, cmake, pkg-config
|
||||
- **Version Control**: git, gh (GitHub CLI), delta (better diffs), lazygit
|
||||
- **CLI Utilities**:
|
||||
- Search: ripgrep, fd, fzf
|
||||
- Files: eza, bat, broot
|
||||
- Data: jq, yq
|
||||
- System: duf, dust, pv, parallel
|
||||
- Text: sd (better sed), tealdeer (tldr)
|
||||
- **Editors**: Zed Editor, micro, Claude Code, OpenCode
|
||||
- **Nix Tools**: nil (LSP), nixd, nixfmt (formatter)
|
||||
- **Package Manager**: pnpm (for Node.js)
|
||||
|
||||
## 🎵 Audio & Media
|
||||
|
||||
- **Audio Stack**: PipeWire with JACK support
|
||||
- **Bluetooth**: Enabled with experimental features
|
||||
- **Music Server**: Navidrome for self-hosted streaming
|
||||
|
||||
*Media apps via user profile: Feishin, MPV, Celluloid, OBS Studio, Amberol*
|
||||
- **Audio Stack**: PipeWire with ALSA, PulseAudio, and JACK support
|
||||
- **Volume Control**: pwvucontrol (Qt/PipeWire), pavucontrol (GTK/fallback)
|
||||
- **Media Control**: playerctl for media keys and D-Bus control
|
||||
- **Bluetooth**: Full codec support (LDAC, AAC, aptX HD, aptX, SBC-XQ)
|
||||
- **Music Server**: Navidrome (localhost:4533) with Last.fm scrobbling
|
||||
- **Music Tools**: Feishin (client), Picard (tagger), beets (library manager), cava (visualizer)
|
||||
- **Video Players**: MPV, Celluloid (MPV GUI), VLC
|
||||
- **Screen Recording**: OBS Studio, GPU Screen Recorder, Swappy (annotation)
|
||||
|
||||
## ⚙️ 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 |
|
||||
| **Tailscale** | Mesh VPN for secure remote access |
|
||||
| **OpenSSH** | Remote shell access |
|
||||
| **Navidrome** | Music streaming server (port 4533) |
|
||||
| **Avahi** | mDNS for .local network discovery |
|
||||
| **Profile-sync-daemon** | Browser profiles in tmpfs for faster performance |
|
||||
| **ZRAM** | Compressed swap in RAM (zstd, 100% memory) |
|
||||
| **fstrim** | Weekly SSD TRIM for longevity |
|
||||
| **earlyoom** | Prevent system freeze on low memory |
|
||||
| **plocate** | Fast file search database (daily updates) |
|
||||
| **fwupd** | Firmware updates |
|
||||
| **scx_lavd** | Low-latency scheduler for gaming |
|
||||
|
||||
## 📦 Package Management
|
||||
|
||||
This configuration follows the NixOS best practice of separating system and user packages:
|
||||
All packages in this configuration are installed as system packages (`environment.systemPackages`) across different modules. This provides:
|
||||
|
||||
### System Config (`environment.systemPackages`)
|
||||
- **Unified Management**: All packages updated together during system rebuild
|
||||
- **Reproducibility**: Entire system configuration in one place
|
||||
- **No Profile Conflicts**: Avoid nix profile state issues
|
||||
|
||||
Packages that require system integration:
|
||||
- Services (Docker, Tailscale, Steam)
|
||||
- Hardware support (gamemode, gamescope)
|
||||
- Desktop infrastructure (portals, polkit, Wayland utils)
|
||||
- Shell and plugins (Fish, shell aliases dependencies)
|
||||
- Build tools and runtimes (gcc, nodejs, python, rustup)
|
||||
### Package Categories
|
||||
|
||||
### User Profile (`nix profile`)
|
||||
| Category | Module | Examples |
|
||||
|----------|--------|----------|
|
||||
| **Desktop Core** | configuration.nix, desktop.nix | Nautilus, Ghostty, Zen Browser, Noctalia, Vicinae, wl-clipboard |
|
||||
| **Applications** | apps.nix | Vesktop, Thunderbird, Signal, Telegram, Obsidian, OnlyOffice |
|
||||
| **Media** | apps.nix | Loupe, Evince, MPV, Celluloid, VLC, Feishin, Picard, OBS |
|
||||
| **Development** | dev.nix | Docker, Node.js, Rust, Python, Bun, git, lazygit, CLI tools |
|
||||
| **Gaming** | gaming.nix | Steam, Lutris, Heroic, Faugus Launcher, Wine, Gamescope |
|
||||
| **System Tools** | apps.nix | btop, Mission Center, Bitwarden, file-roller, disk utility |
|
||||
| **GPU** | gpu-amd.nix | CoreCtrl, radeontop, nvtop, Vulkan tools |
|
||||
| **Shell** | shell.nix | Fish plugins (pure, autopair, fzf-fish, done, grc) |
|
||||
| **Theming** | theming.nix | Fonts (JetBrains Mono, Inter, Noto), themes (adw-gtk3), icons (Papirus) |
|
||||
|
||||
GUI apps and fast-updating tools managed independently.
|
||||
### Adding Packages
|
||||
|
||||
**Prerequisite:** Enable unfree packages for nix profile:
|
||||
```bash
|
||||
mkdir -p ~/.config/nixpkgs
|
||||
echo '{ allowUnfree = true; }' > ~/.config/nixpkgs/config.nix
|
||||
```
|
||||
|
||||
**Install packages:**
|
||||
```bash
|
||||
# Priority tools (AI coding, editors, browser)
|
||||
nix profile add github:youwen5/zen-browser-flake
|
||||
nix profile add github:anomalyco/opencode
|
||||
nix profile add nixpkgs#claude-code
|
||||
nix profile add nixpkgs#zed-editor
|
||||
|
||||
# Communication
|
||||
nix profile add nixpkgs#vesktop nixpkgs#thunderbird nixpkgs#signal-desktop nixpkgs#telegram-desktop
|
||||
|
||||
# Productivity
|
||||
nix profile add nixpkgs#libreoffice-fresh nixpkgs#obsidian
|
||||
|
||||
# Media
|
||||
nix profile add nixpkgs#loupe nixpkgs#evince nixpkgs#celluloid nixpkgs#mpv
|
||||
nix profile add nixpkgs#amberol nixpkgs#feishin nixpkgs#picard nixpkgs#beets nixpkgs#cava
|
||||
nix profile add nixpkgs#obs-studio nixpkgs#gpu-screen-recorder nixpkgs#kooha nixpkgs#swappy
|
||||
|
||||
# Utilities
|
||||
nix profile add nixpkgs#btop nixpkgs#mission-center nixpkgs#bitwarden-desktop
|
||||
nix profile add nixpkgs#gnome-calculator nixpkgs#gnome-clocks nixpkgs#baobab
|
||||
nix profile add nixpkgs#localsend nixpkgs#meld nixpkgs#fastfetch
|
||||
|
||||
# Dev tools
|
||||
nix profile add nixpkgs#lazygit nixpkgs#lazydocker nixpkgs#dbeaver-bin
|
||||
nix profile add nixpkgs#httpie nixpkgs#curlie nixpkgs#glances nixpkgs#inxi
|
||||
|
||||
# Gaming
|
||||
nix profile add nixpkgs#lutris nixpkgs#heroic nixpkgs#protonup-qt
|
||||
```
|
||||
|
||||
**Benefits:**
|
||||
- Update apps instantly with `update-apps` (no sudo, no rebuild)
|
||||
- System stays stable while apps get latest versions
|
||||
- Faster iteration for daily-use tools
|
||||
To add a new package:
|
||||
1. Identify the appropriate module (e.g., apps.nix for GUI apps, dev.nix for dev tools)
|
||||
2. Add the package to the `environment.systemPackages` list
|
||||
3. Run `sudo nixos-rebuild switch --flake .#nixos`
|
||||
|
||||
## 📝 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.)
|
||||
### System Details
|
||||
- **Kernel**: CachyOS latest with x86_64-v3 optimizations
|
||||
- **Bootloader**: Limine with Secure Boot support
|
||||
- **Scheduler**: scx_lavd (low-latency scheduler optimized for gaming)
|
||||
- **Shell**: Fish (default), Zsh (available as fallback)
|
||||
- **Display Manager**: Ly (TUI)
|
||||
- **Compositor**: Niri with Noctalia shell
|
||||
- **User**: `pinj` (Melvin Ragusa)
|
||||
- **Hostname**: `nix`
|
||||
- **Timezone**: Europe/Berlin (German locale with English UI)
|
||||
- **Keyboard**: German (de-latin1-nodeadkeys)
|
||||
|
||||
### Configuration Features
|
||||
- **Unfree Packages**: Enabled globally
|
||||
- **Flakes**: Enabled with nix-command
|
||||
- **Binary Caches**: Vicinae, nix-community, lantian (CachyOS)
|
||||
- **Auto-Optimization**: Store optimization enabled
|
||||
- **Garbage Collection**: Weekly, keeping 14 days
|
||||
- **State Version**: 26.05
|
||||
- **Hibernation**: Configured with encrypted swap (`/dev/mapper/cryptswap`)
|
||||
- **Flatpak**: Enabled with auto-configured Flathub repository
|
||||
|
||||
### Secondary Storage
|
||||
Three additional SSDs mounted at:
|
||||
- `/mnt/Intenso-SSD`
|
||||
- `/mnt/Samsung-SSD`
|
||||
- `/mnt/Extern-SSD`
|
||||
|
||||
### Fish Shell Aliases
|
||||
Common aliases configured in `shell.nix`:
|
||||
- `rebuild`, `rebuild-boot`, `rebuild-test` - NixOS rebuild commands
|
||||
- `update` - Update flake inputs
|
||||
- `gc-nix` - Run garbage collection
|
||||
- `ll`, `ls`, `la`, `lt` - eza file listings
|
||||
- `dc`, `dps`, `dl` - Docker shortcuts
|
||||
- `gs`, `gd`, `gl`, `gp` - Git shortcuts
|
||||
|
||||
## 📄 License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user