Declarative quote [...] desired-state infrastructure graph, Kahn topological DAG sorter, idempotent plan diffing, and .secret-redacted scripts.
Pure-Veko homoiconic Infrastructure-as-Code (quote [...]) resource DSL, Kahn topological DAG sorter, desired-vs-observed convergence planner, hardened systemd unit compiler, and secret-scrubbed POSIX fleet provisioner (iac_fleet).
iac_fleet brings declarative, deterministic server and fleet configuration management to Veko without YAML templating engines or external agents:
compile-stack): Compiles Veko quote [...] blocks directly into validated Stack graphs supporting 8 core infrastructure resource types: .pkg, .file, .dir, .systemd_service, .user, .ufw_rule, .sysctl, and .exec_check with explicit needs = [...] dependency edges.sort-dag): Computes a deterministic execution order respecting all needs edges and rejects circular dependencies with an err naming the exact cycle nodes.plan-changes): Diffs a desired Stack against observed HostFacts snapshots to emit topologically ordered .create, .update (with unified field diffs via diff/format-unified), .noop, and .delete actions. Converged hosts deterministically produce 0 changes (has_changes == false).systemd & Secret-Redacted POSIX Compiler: Generates sandboxed systemd units (NoNewPrivileges=yes, ProtectSystem=strict, PrivateTmp=yes) and idempotent sh -eu scripts while tracking secrets via truncated SHA-256 fingerprints so secret plaintext never enters plan summaries, unified diffs, or audit logs.veko pkg add iac_fleet@1.0.0Import the package in .vk source files:
use [iac = iac_fleet]+-------------------------+ compile-stack +------------------------+
| Homoiconic quote [...] | -----------------------> | Validated Stack + DAG |
| .user / .dir / .file | | Kahn sort-dag |
| .systemd_service / ... | +-----------+------------+
+-------------------------+ |
v
+-------------------------+ plan-changes +------------------------+
| Observed HostFacts | -----------------------> | Deterministic Plan |
| attrs + secret_digests | | +create ~update -del |
+-------------------------+ | <redacted> audit log |
+-----------+------------+
|
v
+------------------------+
| render-systemd-unit |
| render-action-script |
+------------------------+| Symbol | Signature | Description |
|---|---|---|
compile-stack | fn [stack_name str, spec block] Stack | Compiles a homoiconic quote [...] resource stack |
sort-dag | fn [stack Stack] block[Resource] | Topologically orders resources via Kahn's algorithm or returns cycle err |
new-host-facts | fn [hostname str /os_family os_fam str = 'debian'] HostFacts | Creates an empty HostFacts state snapshot |
record-fact | fn [mut facts HostFacts, resource_id str, attrs map /secret_digests sdigests map[str] = {}] enum | Records observed resource state on a host |
plan-changes | fn [stack Stack, facts HostFacts] Plan | Computes ordered .create, .update, .noop, and .delete steps |
apply-plan-facts | fn [facts HostFacts, plan Plan] HostFacts | Applies plan to facts in memory to yield the converged snapshot |
render-systemd-unit | fn [res Resource /redact scrub_secrets bool = true] str | Renders a hardened .service unit file |
render-action-script | fn [action PlanAction /redact scrub_secrets bool = true] str | Compiles one PlanAction into idempotent POSIX sh commands |
render-plan-script | fn [plan Plan /redact scrub_secrets bool = true] str | Compiles a complete Plan into an executable #!/bin/sh script |
scrub-text | fn [text str, secret_values block[str]] str | Replaces any occurrence of secret_values with '<redacted>' |
use [iac = iac_fleet]
stack = iac/compile-stack 'prod-api' (quote [
.user 'veko' [
uid = 990
shell = '/usr/sbin/nologin'
]
.dir '/etc/veko' [
owner = 'veko'
mode = '0750'
needs = ['user:veko']
]
.file '/etc/veko/api.conf' [
owner = 'veko'
mode = '0640'
content = 'port = 8080\n'
needs = ['dir:/etc/veko']
]
.systemd_service 'veko-api' [
user = 'veko'
exec_start = '/usr/local/bin/veko-api -c /etc/veko/api.conf'
secret_env = [ 'API_SECRET' = 'rotate-me-2026' ]
harden = true
needs = ['user:veko' 'file:/etc/veko/api.conf']
]
])
facts = iac/new-host-facts 'api-01.internal'
plan = iac/plan-changes stack facts
println plan.audit_log
println (iac/render-plan-script plan)https://veko-lang.org/pkg/iac_fleet/1.0.0.vkp921e71a68ab0c1659967cdb914502ed0b5407f960c38df981d3780f63ebc80bbbc60188047fe4f2f2c96077a5b34b25ee4a4108b0f08f9ed24538372000fc155ed25519:27406074d8681da1d4e6420f5d887cac15c313334c249ac047ba9d4e2df72b70{"name":"iac_fleet","version":"1.0.0","tier":5.0,"tier_label":"Tier 5: Cloud-Native, Noise, IaC & Wasm","category":"Homoiconic IaC & DAG Provisioner","description":"Declarative quote [...] desired-state infrastructure graph, Kahn topological DAG sorter, idempotent plan diffing, and .secret-redacted scripts.","modules":["iac_fleet"],"homepage":"https://veko-lang.org/packages/iac_fleet"}| Bundle Entry Path | Size | Leaf SHA-256 Digest |
|---|---|---|
| README.md | 5 KB | 67747d46ada52b668354ca6c2255cad06f1e1e688825f417dc08ae69211ab6a2 |
| examples/demo.vk | 9 KB | a57c357051e0655530d1dff469c5ad8f8c63a9a68cc88726648bd637b7f9fd0a |
| mod.vk | 27 KB | e87019727ad087a1d59ad1a82d595af7d933c59825329bf7b236f87be3c973b7 |