No description
- Nix 75.8%
- Lua 23%
- Shell 1.2%
Add the openlogi flake input (github:AprilNEA/OpenLogi, nixpkgs follows), import its default nixos module for the framework host in mkHost, and set programs.openlogi.enable = true in the framework system config. Also commits pending framework tweaks (flatpak, nix-ld libraries, cmake/ninja/rpi-imager) and a zsh edit-command-line binding. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HWNA9YyeXsDEMpnyYf4voe |
||
|---|---|---|
| .github/workflows | ||
| .vscode | ||
| Cheat Sheets | ||
| hosts | ||
| modules | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
NixOS Multi-VM Konfiguration
Eine modulare NixOS-Konfiguration mit Flakes für mehrere Systeme, inklusive Home Manager und VSCode Server.
📋 Übersicht
Dieses Repository verwaltet die NixOS-Konfigurationen für mehrere Hosts:
- framework: Framework Laptop (x86_64-linux)
- nix1: Standard NixOS Host (x86_64-linux)
- wsl: NixOS im Windows Subsystem for Linux (WSL)
Die Konfiguration nutzt moderne NixOS-Tools:
- 🔧 Flakes: Deklarative Abhängigkeitsverwaltung
- 🏠 Home Manager: Benutzerkonfiguration (dotfiles, Programme)
- 📺 VSCode Server: Remote Code Editor Support
- 🐧 NixOS-WSL: WSL-spezifische Optimierungen
📁 Projektstruktur
.
├── flake.nix # Flakes-Manifest mit allen Inputs/Outputs
├── flake.lock # Lock-Datei für reproduzierbare Builds
├── hosts/
│ ├── framework/ # Framework Host-Konfiguration
│ │ ├── configuration.nix # Imports & Home Manager
│ │ ├── system.nix # System-spezifische Einstellungen
│ │ └── hardware-configuration.nix
│ ├── nix1/ # nix1 Host-Konfiguration
│ │ ├── configuration.nix # Imports & Home Manager
│ │ ├── system.nix # System-spezifische Einstellungen
│ │ └── hardware-configuration.nix
│ └── wsl/ # WSL Host-Konfiguration
│ ├── configuration.nix # Imports & Home Manager
│ ├── system.nix # WSL-spezifische Systemeinstellungen
│ └── hardware-configuration.nix
└── modules/ # Wiederverwendbare Modul-Komponenten
├── base.nix # Basis-Systemkonfiguration
├── services/ # Systemdienste
│ ├── qemu-guest.nix # QEMU Guest-spezifische Settings
│ ├── ssh.nix # SSH-Konfiguration
│ ├── nix-ld.nix # nix-ld Konfiguration
│ └── vscode-server.nix # VSCode Server
├── users.nix # Benutzerkonfiguration (nixos & nic)
└── home-manager/ # Home Manager Module
├── alacritty.nix # Alacritty Terminal
├── neovim.nix # Neovim Editor
├── nvim/ # Neovim Lua Konfiguration
│ ├── init.lua
│ └── lua/ # Plugins, Keymaps, Optionen
├── zsh.nix # Zsh Shell
├── .zshrc-extra # Zsh Zusatzkonfiguration
├── git.nix # Git Konfiguration
├── tmux.nix # Tmux Multiplexer
├── .tmux-extra.conf # Zusätzliche Tmux Konfiguration
├── starship.nix # Starship Prompt
├── fzf.nix # Fuzzy Finder
├── zoxide.nix # Smart Navigation
├── bat.nix # Cat Replacement
├── opencode.nix # opencode CLI Konfiguration
└── packages.nix # Zusätzliche Pakete
🚀 Schnellstart
Voraussetzungen
- NixOS 25.05 oder neuer
gitinstalliert
System deployen
# System bauen und aktivieren (nix1)
sudo nixos-rebuild switch --flake .#nix1
# WSL-System deployen
sudo nixos-rebuild switch --flake .#wsl
# Nur bauen ohne zu aktivieren (test)
nixos-rebuild build --flake .#nix1
Home Manager Konfiguration
# Home Manager mit aktueller Konfiguration aktivieren
home-manager switch --flake .#nic
📦 Abhängigkeiten
Die Konfiguration nutzt folgende externe Inputs:
| Input | URL | Zweck |
|---|---|---|
nixpkgs |
nixos-25.05 |
Paketquelle |
home-manager |
release-25.05 |
Benutzerkonfiguration |
nixos-wsl |
main |
WSL-Support |
nixos-hardware |
main |
Hardware-Module (Framework) |
vscode-server |
main |
VSCode Server Integration |
Alle werden in flake.lock gepinnt für Reproduzierbarkeit.
⚙️ Konfigurationsmodule
Systemmodule
- base.nix: Zeitzone, Netzwerk, Basis-Pakete, Zsh
- users.nix: Benutzer (nixos & nic) mit SSH-Keys
- services/qemu-guest.nix: QEMU VM Optimierungen
- services/ssh.nix: SSH Daemon Konfiguration
- services/nix-ld.nix: nix-ld Libraries
- services/vscode-server.nix: VS Code Server
Host-spezifische Module
- hosts/framework/system.nix: Framework Hardware, Desktop, nix-ld
- hosts/nix1/system.nix: Bootloader, VSCode Server, nix-ld
- hosts/wsl/system.nix: WSL, VSCode Server, nix-ld
Home Manager Programme (modular pro Programm)
- alacritty.nix: Terminal-Konfiguration
- neovim.nix: Editor Konfiguration (Lua unter
modules/home-manager/nvim/)- LSPs:
lua_ls,nixd,pyright,ts_ls,eslint,rust_analyzer,marksman
- LSPs:
- zsh.nix: Shell mit Aliases, History, Zinit Plugins (
.zshrc-extra)tmuxreload: Tmux Konfiguration neu laden
- git.nix: Git mit Aliases und Konfiguration
- tmux.nix: Terminal Multiplexer mit Catppuccin Theme
- Zusätzliche Konfiguration in
.tmux-extra.conf - Vim-style Navigation und Keybindings
- Plugin-Integration (sensible, yank, catppuccin)
- Zusätzliche Konfiguration in
- starship.nix: Prompt mit Git-Integration
- fzf.nix: Fuzzy Finder mit Farbschema
- zoxide.nix: Intelligente Directory Navigation
- bat.nix: Cat Replacement mit Theme
- opencode.nix: opencode CLI Settings
- packages.nix: Zusätzliche Systempakete (ripgrep, fd, eza, etc.)
🔧 Kustomisierung
Neuer Host hinzufügen
- Verzeichnis erstellen:
mkdir -p hosts/myhost
- Konfigurationsdateien erstellen:
cp hosts/nix1/configuration.nix hosts/myhost/
cp hosts/nix1/hardware-configuration.nix hosts/myhost/
- In
flake.nixhinzufügen:
myhost = mkHost { hostName = "myhost"; };
Module hinzufügen
- Neue
.nixDatei inmodules/erstellen - In der Host-Konfiguration importieren:
imports = [
../modules/dein-module.nix
];
📝 Wichtige Befehle
System-Befehle
# System updaten und deployen
sudo nixos-rebuild switch --flake .#nix1
# Systemkonfiguration prüfen (ohne zu ändern)
sudo nixos-rebuild test --flake .#nix1
# Nur bauen (keine Aktivierung)
nixos-rebuild build --flake .#nix1
# Generationen anzeigen
sudo nix-env -p /nix/var/nix/profiles/system --list-generations
# Zur vorherigen Generation zurückrollen
sudo nixos-rebuild switch --rollback
# Garbage Collection
nix-collect-garbage -d
# Flakes updaten
nix flake update
# Pre-commit Hooks installieren
pre-commit install
# Pre-commit Hooks ausfuhren
pre-commit run --all-files
Dev Shells
# Python Dev Shell
nix develop .#python
# Go Dev Shell
nix develop .#go
# Node.js Dev Shell
nix develop .#node
# Rust Dev Shell
nix develop .#rust
Shell-Aliases
# Tmux Konfiguration neu laden
tmuxreload
🐛 Troubleshooting
Änderungen werden nicht übernommen
flake.lockauf dem neuesten Stand?nix flake update- Verwendest du die richtige Flake-Referenz?
--flake .#hostname
WSL Probleme
- WSL-Modul in
flake.nixaktiviert? (withWSL = true) - WSL-Systemkonfiguration in
hosts/wsl/system.nixangepasst?
Home Manager Konflikte
- Existierende Dotfiles? → Home Manager kann Konflikte haben
home-manager newsfür Breaking Changes prüfen
📚 Ressourcen
📜 Lizenz
Die Konfiguration kann frei verwendet und modifiziert werden.
Autor: Nic Zuletzt aktualisiert: 27. Januar 2026