1
0
Fork
You've already forked velcelis
0
A documented GNU Guix system configuration, mistakes included.
  • Scheme 100%
coopi f3542318f9
velctl: Rewrite to use Guix scripting APIs directly.
* velctl.scm: Switch from 'guile -e' to 'guix repl --' bootstrapping.
(%load-path): Prepend %project-root.
(%guix-profile): New variable.
(info): New procedure.
(warning): New procedure.
(leave): New procedure.
(%commands): New variable.
(paragraph): New procedure.
(split-docstring): New procedure.
(parse-keyword-clauses): New procedure.
(show-cmd-help): New procedure.
(define-cmd): New macro.
(show-general-help): New procedure.
(cmd-system): Use guix-system instead of run! with system*.
(cmd-home): Use guix-home instead of run! with system*.
(cmd-manifests): Use guix-package instead of run! with system*.
(cmd-channel): Use guix-pull instead of run! with system*. Replace capture
with open-pipe* with profile-channels and channel->code.
(cmd-secrets): Inline subcmd-user-secrets and subcmd-host-secrets as match
patterns.
(main): Wrap with with-error-handling. Dispatch via %commands instead of
explicit match clauses.
(%color?): Remove.
(esc): Remove.
(bold): Remove.
(italic): Remove.
(underline): Remove.
(red): Remove.
(green): Remove.
(yellow): Remove.
(cyan): Remove.
(success): Remove.
(warn): Remove.
(die): Remove.
(capture): Remove.
(%help:general): Remove.
(%help:system): Remove.
(%help:home): Remove.
(%help:manifests): Remove.
(%help:channel): Remove.
(%help:secrets): Remove.
(subcmd-user-secrets): Remove.
(subcmd-host-secrets): Remove.
2026年06月02日 08:22:19 +04:00
etc/secrets/users Add SOPS secret management. 2026年05月27日 09:41:45 +04:00
velcelis users: Set EDITOR to emacsclient for coopi. 2026年05月29日 18:15:30 +04:00
.dir-locals.el Initial commit 2026年05月26日 15:24:52 +04:00
.gitignore Initial commit 2026年05月26日 15:24:52 +04:00
.guix-channel Initial commit 2026年05月26日 15:24:52 +04:00
.sops.yaml Add SOPS secret management. 2026年05月27日 09:41:45 +04:00
LICENSE.org Initial commit 2026年05月26日 15:24:52 +04:00
README.org Add SOPS secret management. 2026年05月27日 09:41:45 +04:00
velctl.scm velctl: Rewrite to use Guix scripting APIs directly. 2026年06月02日 08:22:19 +04:00

velcelis

Hello, and welcome!

This repository contains my literate dotfiles for GNU Guix System. Everything lives in Org mode and gets tangled into the Scheme files that actually configure my system. The prose is at least as important as the code—it's the only record of why past me did anything.

Right now this targets a single machine and a single user. I've tried to structure things in a way that could extend to more, but I should be honest: I've only ever done one-on-one setups, so a lot of this is educated guessing, cargo-culting, and vibes. Any apparent foresight is mostly accidental.

Consider this a snapshot of someone learning Guix in real time.

What is this?

  • A reproducible Guix System and Home configuration
  • A literate notebook of experiments, explanations, and bad ideas
  • A mildly organised mess that somehow boots

If you're looking for expert Guix wizardry, you are in the wrong place. If you want to see how someone muddles through and occasionally learns something—welcome.

Repository layout

Org files are the source of truth. Tangled output is generated from them, and Guix consumes it from there.

  ./
 ├──  etc/
 │ └──  secrets/
 │ ├──  hosts/ ← Host secrets
 │ └──  users/ ← User secrets
 ├──  velcelis/
 │ ├──  channels/ ← Channel specifications
 │ │ └──  pinned/ ← Pinned channel snapshots
 │ ├──  hosts/ ← Guix System configurations
 │ ├──  manifests/ ← Package manifests
 │ └──  users/ ← Guix Home configurations
 └──  velctl.scm ← control script

velctl — the task runner

Typing out full guix invocations by hand gets old fast. velctl.scm is a small, self-contained Guile script (no build system, no extra dependencies) that drives the common operations against this layout.

Installation

Just make sure velctl.scm is executable and somewhere on your $PATH, or invoke it directly:

 chmod +x velctl.scm
 ./velctl.scm --help

Usage

 velctl.scm <command> [args ...]
 velctl.scm -h | --help

Every command accepts -h / --help for per-command usage. Set NO_COLOR in the environment to disable colored output (no-color.org).

velctl system [<host>]

Runs guix system reconfigure against hosts/tangled/<host>.scm. Omit <host> and it uses the current machine's hostname.

 velctl.scm system # reconfigure current host
 velctl.scm system mnt-reform # reconfigure a specific host

velctl home [<user>]

Runs guix home reconfigure against users/tangled/<user>.scm. Omit <user> and it uses the current login name.

 velctl.scm home # reconfigure for current user
 velctl.scm home xenia # reconfigure for a specific user

velctl manifests [<regexp>]

Collects every .scm file in manifests/ whose name (without the .scm extension) matches <regexp>, then applies them all in a single guix package -m ... invocation. Without a pattern, every manifest in the directory is used.

 velctl.scm manifests # apply all manifests
 velctl.scm manifests 'dev' # only names containing 'dev'
 velctl.scm manifests '^font' # names starting with 'font'

velctl channel <name>

Pulls from channels/<name>.scm via guix pull -C, then captures the resolved channel description with guix describe -f channels and writes it to channels/pinned/<name>.scm. That pinned file can later reproduce the exact same Guix revision. <name> is required.

 velctl.scm channel default # pull & pin 'default'
 velctl.scm channel nonguix # pull & pin 'nonguix'

velctl secrets [user|host] [<name>]

Opens an encrypted YAML secrets file in your $EDITOR. SOPS handles decryption and re-encryption transparently. New files are created automatically.

Without a subcommand, edits the common secrets file. When user or host is given without a name, the current user or hostname is used.

 velctl.scm secrets # edit common secrets
 velctl.scm secrets user # edit secrets for current user
 velctl.scm secrets user xenia # edit secrets for user 'xenia'
 velctl.scm secrets host # edit secrets for current host
 velctl.scm secrets host mnt-reform # edit secrets for host 'mnt-reform'

Goals (aspirational)

  • Keep the configuration readable and reproducible
  • Prefer clarity over cleverness
  • Write down why something exists before I forget
  • Leave myself just enough structure to not regret everything later

Non-goals

  • Being minimal
  • Being optimal
  • Being an example of best practices
  • Knowing what I'm doing at all times

This is a work in progress, and occasionally a crime scene.

Using this

If you're browsing: start with the Org files. The commentary is where the intent (and the confusion) lives.

If you want to reuse any of this: expect to adapt it heavily, expect rough edges, expect Guile mistakes, and ask yourself honestly why you're doing this. That said—take whatever seems useful.

Final note

If you're new to Guix and something here helps—even by showing what not to do—then this repo has already succeeded beyond expectations.

Good luck, and happy hacking.