Donghyun Shin's NixOS flake configuration — declarative system management for a Hyprland desktop and laptop, with AMD NPU/AI acceleration, Korean input, and a structured module system.
# Clone & enter
git clone https://github.com/apersomany/dotfiles ~/dotfiles
cd ~/dotfiles
# Build & switch (pick your host)
sudo nh os switch . --hostname workstation
sudo nh os switch . --hostname laptop- A working NixOS installation with
nix-commandandflakesenabled. - Hardware config (
hosts/<host>/hardware-configuration.nix) generated bynixos-generate-config. - (Optional)
direnv+nix-direnvfor automatic dev shell loading.
| Host | Role | Hardware highlights |
|---|---|---|
workstation |
Desktop | AMD Ryzen AI (NPU), ROCm, image gen |
laptop |
Laptop | ASUS ROG, accelerometer, asusd |
Each host under hosts/ imports a hardware-configuration.nix and selects the
relevant module stack. Host-specific packages and services are kept minimal;
most logic lives in shared modules.
modules/
├── base/ # Shared system config for all hosts
│ ├── default.nix # Nix daemon, networking, firewall, system pkgs
│ └── home.nix # User account, environment variables
├── client/ # Desktop/graphical (Hyprland, apps, theming)
│ ├── default.nix # Imports sub-modules, kime, audio, desktop pkgs
│ ├── home.nix # home-manager: shell, git, alacritty, waybar, rofi
│ ├── font.nix # Fonts (Inter, Cascadia Code, Freesentation)
│ ├── hypr.nix # Hyprland via UWSM, greetd + tuigreet login
│ └── pkgs/
│ └── freesentation.nix # Custom Freesentation Korean font derivation
└── server/ # Headless (SSH, Podman, GPG agent)
└── default.nix
The flake exposes three NixOS module entry points:
inputs.dotfiles.nixosModules.base
inputs.dotfiles.nixosModules.client
inputs.dotfiles.nixosModules.server
Hosts import the modules they need:
- workstation:
base+client(+nix-amd-aifor NPU) - laptop:
base+client
Hyprland configuration lives outside the Nix store for fast iteration:
dynamic/hypr/hyprland.lua
The HYPRLAND_CONFIG env var (set in modules/base/home.nix) points to this
file. Edit it freely and reload with hyprctl reload — no Nix rebuild needed.
All user-specific values are in flake.nix's let block:
username = "aperso";
userFullName = "Donghyun Shin";
gitUserName = "apersomany";
gitUserEmail = "aperso@aperso.dev";To fork, change only these four lines plus hardware-configuration.nix. The
OpenCode AI agent config at opencode.json is
auto-generated by the dev shell and is gitignored — it adapts to your username
automatically.
nix fmt # Format all Nix and Lua files (treefmt wrapper)
nh os build . # Validate without switching
nh os switch . # Build & activateEntering the repo (with direnv) or running nix develop gives you:
- Formatter:
treefmt(nixfmt + stylua) - LSPs:
nil,nixd - Linters:
statix,deadnix - Helper:
nh(nix helper),devenv,gh
| Shortcut | Action |
|---|---|
| Super + Enter | Alacritty terminal |
| Super + R | Rofi app launcher |
| Super + = | Rofi calculator |
| Super + Q | Close window |
| Super + Shift + S | Flameshot screenshot |
| Super + P | Pavucontrol |
| Super + 1–5 | Switch workspace |
| Super + Shift + 1–5 | Move window to workspace |
| Super + arrows | Focus direction |
| Super + Shift + arrows | Move window |
| Super + Ctrl + arrows | Resize window |
| Alt + Enter | Toggle fullscreen |
See dynamic/hypr/hyprland.lua for the complete bindings.
| Input | Source | Purpose |
|---|---|---|
nixpkgs |
nixos/nixpkgs/nixos-unstable |
Rolling NixOS packages |
home-manager |
nix-community/home-manager |
User-level declarative config |
kime |
apersomany/kime (fork) |
Korean input method engine |
nix-amd-ai |
noamsto/nix-amd-ai |
AMD Ryzen AI NPU/ROCm support |
Unlicense — do what you want with it.