Go to file
2026-02-11 20:48:28 +01:00
config [TASK] Improve install with flakes 2026-02-11 20:48:28 +01:00
scripts [TASK] Improve documentation 2026-02-10 20:07:06 +01:00
.editorconfig [TASK] Initialize config 2026-02-03 21:56:52 +01:00
.gitignore [TASK] Save current state 2026-02-06 22:32:49 +01:00
CLAUDE.md [TASK] Improve documentation 2026-02-10 20:07:06 +01:00
install.sh [TASK] Restructure 2026-02-05 20:48:35 +01:00
kvm.xml [TASK] Initialize config 2026-02-03 21:56:52 +01:00
README.md [TASK] Improve install with flakes 2026-02-11 20:48:28 +01:00

NixOS

Playground (QEMU)

sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
  • Video: QXL
  • In configuration.nix: services.spice-vdagentd.enable = true;
  • Falls die HDD zu klein ist: qemu-img resize nixos.qcow2 +20G

Manuelle Installation (UEFI)

1. Root-Shell starten

sudo -i

# Use german keyboard layout
loadkeys de

# Short for all the stuff below !!! ONLY ON EMPTY DRIVES !!!
curl -L https://www.fischer.im/nixos/minimal-install --output install.sh
chmod 744 ./install.sh
./install.sh

reboot

If you don't use the installation script, you need to follow the steps 2-8

2. Partitionierung

Das folgende Schema erstellt view Partitionen auf /dev/sda:

Partition Typ Groesse Mountpoint
/dev/sda1 FAT32 (EFI) 512 MB /boot
/dev/sda2 linux-swap 8 GB
/dev/sda3 ext4 (Root) Rest minus Home /
/dev/sda4 ext4 (Home) 50% des Rests /home

Hinweis: Die Groessen muessen an die eigene Festplatte angepasst werden. Im Beispiel wird eine 100 GB Festplatte verwendet.

# GPT-Partitionstabelle erstellen
parted /dev/sda -- mklabel gpt

# EFI-Partition (512 MB)
parted /dev/sda -- mkpart esp fat32 1MB 512MB
parted /dev/sda -- set 1 esp on

# Swap-Partition (8 GB)
parted /dev/sda -- mkpart swap linux-swap 512MB 8626MB

# Root-Partition (ca. 45 GB)
parted /dev/sda -- mkpart root ext4 8636MB 40000MB

# Home-Partition (Rest)
parted /dev/sda -- mkpart home ext4 40000MB 100%

# Ergebnis pruefen
parted /dev/sda -- print

3. Dateisysteme erstellen

# EFI-Partition formatieren
mkfs.fat -F 32 -n boot /dev/sda1

# Swap-Partition formatieren
mkswap -L swap /dev/sda2

# Root-Partition formatieren
mkfs.ext4 -L nixos /dev/sda3

# Home-Partition formatieren
mkfs.ext4 -L home /dev/sda4

4. Partitionen einhängen

Die Reihenfolge ist wichtig — zuerst Root, dann die Unterverzeichnisse:

# Root mounten
mount /dev/disk/by-label/nixos /mnt

# Boot-Verzeichnis erstellen und mounten
mkdir /mnt/boot
mount -o umask=077 /dev/disk/by-label/boot /mnt/boot

# Home-Verzeichnis erstellen und mounten
mkdir -p /mnt/home
mount /dev/disk/by-label/home /mnt/home

# Swap aktivieren
swapon /dev/disk/by-label/swap

6. Konfiguration generieren

nixos-generate-config --root /mnt

Dies erzeugt zwei Dateien:

  • /mnt/etc/nixos/hardware-configuration.nix — erkannte Hardware und Mountpoints
  • /mnt/etc/nixos/configuration.nix — Grundkonfiguration

7. Bootloader konfigurieren

In /mnt/etc/nixos/configuration.nix sicherstellen, dass der Bootloader korrekt eingerichtet ist:

boot.loader = {
  systemd-boot.enable = true;
  efi.canTouchEfiVariables = true;
};

8. System installieren

nixos-install

# After the installation the script sets your root password. (Test1)

reboot

9. Nach dem ersten Start

curl --output release.tar.gz https://gitea.fischer.im/sebastian/nixos-cesium/archive/[0.0.2].tar.gz
tar xzf release.tar.gz
chmod 744 nixos-cesium/script/post-install.sh
./nixos-cesium/script/post-install.sh

If you don't use the post-installation script, follow the next step

cp -r ~/nixos-cesium/config/* /etc/nixos/

# Remember to activate vm-guest.nix or vm-host.nix in configuration.nix

nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz home-manager
nix-channel --update

# Konfiguration anwenden
nixos-rebuild switch --option experimental-features "nix-command flakes"

reboot

10. Post Installation

# SMB-Zugangsdaten einrichten (falls Netzlaufwerke genutzt werden)
sudo /etc/nixos/setup-smb-credentials.sh

Wartung

# Nix Store optimieren und alte Generationen entfernen
sudo nix-store --optimise && sudo nix-collect-garbage -d