Skip to content

SystemConsultantGroup/dotfiles

 
 

Repository files navigation

dotfiles

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.

Quick start

# 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

First-time requirements

  1. A working NixOS installation with nix-command and flakes enabled.
  2. Hardware config (hosts/<host>/hardware-configuration.nix) generated by nixos-generate-config.
  3. (Optional) direnv + nix-direnv for automatic dev shell loading.

Hosts

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

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

Module selection

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-ai for NPU)
  • laptop: base + client

Runtime config

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.

Forking

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.

Tools & formatting

nix fmt              # Format all Nix and Lua files (treefmt wrapper)
nh os build .        # Validate without switching
nh os switch .       # Build & activate

Dev shell

Entering 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

Keybindings

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.

Dependencies

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

License

Unlicense — do what you want with it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Nix 78.0%
  • Lua 21.9%
  • Shell 0.1%