duynguyen 08e1b2b4b5 feat: add niri, zsh, and daily-use packages
- Add niri compositor with full default config (niri.kdl)
  - tap-to-click, natural-scroll, scroll-factor 0.3
  - waybar, xwayland-satellite, mako autostart
  - kitty as default terminal, fuzzel as launcher
- Add zsh as default shell with autosuggestions, syntax highlighting
- Add starship prompt, zoxide with zsh integration
- Add plasma-manager for declarative KDE dark theme and touchpad settings
- Add zen-browser and claude-desktop via community flakes
- Add vscodium, kitty, foot, fuzzel, waybar, mako, wl-clipboard
- Add swaylock, swayidle, xwayland-satellite for Niri session
- Add daily apps: mpv, imv, grim, slurp, libreoffice, telegram-desktop
- Add CLI tools: btop, ripgrep, fzf, eza, bat, gh
- Set NIXOS_OZONE_WL=1 for Electron apps Wayland and fcitx5 support
- Enable security.polkit for privilege escalation in Niri
- Fix home-manager fontconfig nodePackages bug
- Fix git deprecated userName/userEmail options
2026-08-11 23:07:03 +07:00

nixos-config

Personal NixOS configuration using flakes and home-manager.

Structure

nixos-config/
├── flake.nix                         # Entry point — inputs and outputs
├── hosts/
│   └── nixos/
│       ├── configuration.nix         # System configuration
│       └── hardware-configuration.nix # Auto-generated, machine-specific
└── home/
    └── duynguyen/
        └── default.nix               # Home-manager config (user packages, dotfiles)

What's configured

  • KDE Plasma 6 on Wayland via SDDM, Breeze Dark theme
  • Niri scrollable-tiling compositor (available as a separate session at SDDM)
  • Vietnamese input via fcitx5 + unikey (Telex/VNI)
    • Open fcitx5-configtool → Input Method tab → add Unikey
  • Touchpad: natural scroll, acceleration 0.4, scroll factor 0.75
  • Shell: zsh (default) with autosuggestions, syntax highlighting, starship prompt, zoxide
  • Locale: English UI, Vietnamese formats (currency, time, etc.), Asia/Ho_Chi_Minh timezone
  • Pipewire for audio
  • Packages:
    • Browsers: firefox, zen-browser, claude-desktop
    • Terminals: kitty, foot
    • Editor: vscodium
    • Niri tools: fuzzel, waybar, mako, wl-clipboard
    • Daily apps: mpv, imv, grim + slurp, libreoffice, telegram-desktop
    • CLI: btop, ripgrep, fzf, eza, bat, gh
    • System: claude-code, git, kate

Reproducing on a fresh machine

1. Install NixOS

Boot the NixOS ISO, partition, and install as normal. During install, choose KDE Plasma if prompted.

2. Enable flakes temporarily

nix-shell -p git --command "bash"
# or just proceed if git is already available

3. Clone this repo

git clone <repo-url> ~/nixos-config
cd ~/nixos-config

4. Provide the hardware config

hardware-configuration.nix is machine-specific and not tracked in git. Copy the one generated by the NixOS installer:

cp /etc/nixos/hardware-configuration.nix ~/nixos-config/hosts/nixos/hardware-configuration.nix

5. Apply the configuration

sudo nixos-rebuild switch --flake ~/nixos-config#nixos

6. Lock the flake inputs

nix flake update

Commit the resulting flake.lock so future rebuilds use the exact same package versions.

Daily usage

Task Command
Apply system + home changes sudo nixos-rebuild switch --flake ~/nixos-config#nixos
Update all inputs nix flake update
Roll back last switch sudo nixos-rebuild switch --rollback
Search packages nix search nixpkgs <name>

Adding packages

  • System-wide (available to all users): hosts/nixos/configuration.nixenvironment.systemPackages
  • User-level (home-manager managed): home/duynguyen/default.nixhome.packages
  • Per-user via NixOS: hosts/nixos/configuration.nixusers.users.duynguyen.packages

Vietnamese input setup (fcitx5)

After first build:

  1. Open fcitx5-configtool
  2. Go to the Input Method tab → add Unikey
  3. Switch between English/Vietnamese with Super+Space

Unikey supports both Telex (default) and VNI — configure in the Unikey settings.

S
Description
No description provided
Readme
2.4 MiB
Languages
Nix 100%