Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 6s
4.1 KiB
4.1 KiB
type, project, tags
| type | project | tags | ||||||
|---|---|---|---|---|---|---|---|---|
| guide | nixos |
|
Validation Guide: DMS Desktop Bootstrap & Container Reproducibility Test
Executive Summary
To verify the standalone workstation's disaster recovery and first-boot convergence without risking the host system, we conducted an end-to-end containerized bootstrap test using an isolated NixOS Docker container (nixos/nix:latest).
The test verified:
- Pure flake evaluation and check (
nix flake check) in a freshly cloned environment. - The exact behavior of
dms setup bindsin an empty user home directory. - The preservation of the application's runtime mutation model without store-symlink conflicts.
1. Container Isolation & Flake Evaluation Test
We spawned an ephemeral container running official nixos/nix to simulate a clean machine without pre-existing user configurations or local caches:
docker run --rm \
-v /home/kiskaadee/Config:/repo:ro \
nixos/nix:latest \
sh -c '
git config --global --add safe.directory "*"
git clone /repo /root/Config
cd /root/Config
nix --extra-experimental-features "nix-command flakes" flake check
'
Results
- Git Clone: Successfully cloned the declarative repository into
/root/Config. - Inputs Evaluated:
nixpkgs(unstable official zstd tarball)home-managerdms,dgop,dank-greeter,dankcalendar,danksearchzen-browser-flake,antigravity-nix
- Outcome:
all checks passed!(Clean evaluation ofnixosConfigurations.laptop).
2. Desktop Bootstrap Test: dms setup binds
On a fresh NixOS installation, the DMS daemon touches an empty 0-byte file for binds.kdl if missing, resulting in absent keybindings on initial launch.
To validate the non-privileged bootstrap protocol, we executed dms setup binds in a completely empty, simulated user environment (HOME=/tmp/fresh-user):
echo "1" | DMS_PRIVESC=sudo HOME=/tmp/fresh-user dms setup binds
Observed Behavior & Verification
- Compositor Detection: DMS correctly auto-detected
nirias the active Wayland compositor. - Terminal Detection: DMS detected
alacrittyand populated all application launcher strings accordingly. - Privilege Escalation: Setting
DMS_PRIVESC=sudocleanly bypassed interactive prompts. - File Generation:
- Location:
~/.config/niri/dms/binds.kdl - File Size:
9,153 bytes - Permissions:
-rw-r--r--(0644, owned by the user)
- Location:
- Keybindings Populated:
- Core launchers:
Mod+T(Alacritty),Mod+Space(Spotlight),Alt+Space(Spotlight Bar),Mod+V(Clipboard),Mod+M(Task Manager). - Session controls:
Super+X(Power Menu),Mod+Comma(Settings),Mod+Tab(Overview),Mod+Shift+E(Quit). - Audio & Brightness:
XF86AudioRaiseVolume,XF86MonBrightnessUp, MPRIS controls. - Window & Workspace navigation:
Mod+Q(Close),Mod+F(Maximize),Mod+Shift+T(Floating), column and monitor navigation.
- Core launchers:
3. The Declarative vs. Runtime Mutation Proof
| Configuration | Behavior Under Store Symlink (home.file) |
Behavior Under Seeded Bootstrap (dms setup binds) |
|---|---|---|
| Monitor Re-arrangement | Fails or gets overwritten on nixos-rebuild switch. |
Persisted by DMS to outputs.kdl cleanly. |
| Wallpaper Theming | Matugen cannot write dynamic palettes to read-only store. | Matugen updates colors.kdl dynamically at runtime. |
| GUI Keybinding Tweaks | Fails with EACCES when editing in DMS Settings. |
Modifies binds.kdl directly with user permissions. |
| First-Boot State | Zero shortcuts if empty file touched. | Complete functional desktop instantly seeded. |
4. Disaster Recovery Procedure Summary
On any new workstation machine:
- Perform bare-metal install per
docs/getting-started.md. - Execute initial switch:
sudo nixos-rebuild switch --flake ~/Config#laptop. - Log into Niri via
dank-greeter. - Run the one-time desktop bootstrap:
dms setup binds - All Niri shortcuts, DMS panels, and custom user keybindings (
custom.kdl) become immediately functional.