Commit 71f13dc677b7

Vincent Demeester <vincent@sbr.pm>
2025-11-19 23:30:49
feat: Add imperative config directory for non-NixOS systems
- Organize configuration scripts for non-NixOS managed hosts - Move nagoya setup script to /imperative/nagoya/apply.sh - Support idempotent configuration management across diverse systems Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent c94ffbb
Changed files (3)
nagoya.postinstall.sh → imperative/nagoya/apply.sh
@@ -48,6 +48,7 @@ setup.docker() {
 	sudo chmod a+r /etc/apt/keyrings/docker.asc
 
 	# Add the repository to Apt sources:
+	# shellcheck disable=SC1091
 	sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
 Types: deb
 URIs: https://download.docker.com/linux/debian
@@ -62,7 +63,7 @@ EOF
 
 setup.kind() {
 	log_info "Install kind..."
-	[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.30.0/kind-linux-arm64
+	[ "$(uname -m)" = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.30.0/kind-linux-arm64
 	chmod +x ./kind
 	sudo mv ./kind /usr/local/bin/kind
 }
CLAUDE.md
@@ -21,6 +21,7 @@ The repository follows a modular architecture centered around `flake.nix`:
 - **`/modules`**: Custom NixOS modules (wireguard-client, wireguard-server, govanityurl, gosmee)
 - **`/overlays`**: Nix overlays for additions, modifications, and unstable packages
 - **`/keyboards`**: Hardware keyboard configurations (ZMK for Corne, QMK for Moonlander, Kanata software remapper)
+- **`/imperative`**: Idempotent configuration scripts for non-NixOS managed systems, organized by hostname (e.g., `/imperative/nagoya/apply.sh`). These scripts are meant to be run repeatedly to maintain system state on hosts that cannot use NixOS.
 
 ### Host Configuration Pattern
 
README.org
@@ -106,6 +106,18 @@
 - Software keyboard remapper configuration to mimic mechanical keyboards
 - System-level key remapping for non-keyboard hardware
 
+** =/imperative=
+Idempotent configuration scripts for systems not managed by NixOS, organized by hostname:
+- Each host has its own directory (e.g., =/imperative/nagoya/=)
+- Scripts are designed to be run repeatedly to maintain system state
+- Primary script in each host directory is typically =apply.sh=
+- Used for bootstrapping and ongoing configuration management of non-NixOS systems (Debian, Arch, Windows, etc.)
+
+Examples of hosts that may have imperative configurations:
+- =nagoya= - Debian-based system (server)
+- =wakasu= - Fedora-based system (desktop)
+- Additional systems running operating systems other than NixOS
+
 * Usage
 
 The main entry point is =flake.nix=, which provides: