Repository navigation
Conversation
…ines Every evaluation declares `caisson.<integration>.configurations` for every integration caisson ships, and `childrenOf` read each of them, merging an option that only holds its default. It now reads an option only when a module defines it, and the types of the options are built once for all integrations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An hjem configuration is the files and packages of a user, evaluated with hjem's user module at every system in force where it is declared. Its outputs are the version 3 manifest hjem's OS modules write, that manifest as a file checked with hjem's schema, the packages and hjem's CLI. It is published as `hjemConfigurations.<name>`, which `hjem standalone switch --flake` reads, and a top projects to what `hjem standalone switch --config` reads. A NixOS configuration activates the hjem configurations declared inside it with the NixOS module `hjem-activation`. It writes the template units hjem's NixOS module writes, under the same names, and each instance runs the CLI of the configuration of its user. caisson's default NixOS module imports it, and gives each hjem configuration the hjem module `nixos-parent`, which takes the home directory from the machine's account for the user. An hjem configuration inside a NixOS machine also imports hjem's `modules/nixos/systemd.nix` with the `utils` and options of the machine, so it declares systemd user units as a user hjem's NixOS module embeds does. The `hjem-system` check builds the units and the manifest file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
caisson.hjem, an integration over hjem whose configurations are the files and packages of one user.What an hjem configuration is
hjem evaluates a user only inside its NixOS and nix-darwin modules, as an entry of
hjem.users. caisson evaluates hjem's user module,modules/common/user.nix, with its ownevalModules. It passes the arguments hjem's OS modules pass: hjem's library ashjem-lib, the user's name asname, the package set aspkgs, and the machine above the configuration asosConfig.userdefaults to the name the configuration is declared under. The configuration is found by that name inconfigs/hjem.The outputs are what hjem's tools read:
manifestmanifestFilecue vetwhen builtpackagescliA top publishes the configuration as
hjemConfigurations.<name>withmanifestandpackages. That is the attributehjem standalone switch --flake .reads for$USER. The value of an hjem configuration that is a top hasmanifestandpackagesas well, whichhjem standalone switch --configreads from a file. The manifest of the evaluation sits undercaisson.manifestbehind anoutPath, so the CLI serializes it as a string.Inside a NixOS machine
caisson does not use hjem's NixOS module. The new NixOS module
hjem-activation, imported by caisson'sdefaultNixOS module, writes the units hjem's NixOS module writes, under the same names. These arehjem-prepare, the templateshjem-activate@,hjem-reload@andhjem-update-state@,hjem-cleanupand the targethjem. The unit scripts are the same, with strict shell checks, and they read the manifests of the generation from one directory. Each instance runs the CLI of the configuration of its user. The module also adds each user's packages tousers.users.<user>.packagesand the user'sextraDependenciesto the system closure, as upstream does.Through
caisson.forChildren, caisson's default NixOS module gives each hjem configuration the hjem modulenixos-parent. That module setsdirectoryfrom the machine's account for the user, and refuses a user without an enabled account. An hjem configuration inside a NixOS machine also imports hjem'smodules/nixos/systemd.nixwith the machine'sutilsand options. As a result, it can declare systemd user units, like a user embedded by hjem's NixOS module.The units link with hjem's own CLI and the backup prefix
.backup-. hjem's NixOS options for another linker or forsystemd-tmpfileshave no counterpart.The cost of one more integration
Every evaluation declares a
caisson.<integration>.configurationsoption for every integration, andchildrenOfread all of them. The first commit makeschildrenOfread only the options that a module defines, and builds the option types once. With hjem added, caisson's evaluation overhead in the eval-weight check drops from 4.26 MB to 4.15 MB, and the ceiling stays 4.28 MB.Tests
tests/dependenciesand checks two cases.hjemConfigurations.probe.hjem-systemcheck builds the manifest file, which runscue vetagainst hjem's schema, and the six units, which runs shellcheck on their scripts.Activation on a running machine is not tested.
All 18 workspace consumers pass
nix flake check --no-buildat #96, which contains this branch. That run puts the branch in place of both caisson pins of each consumer: the root input, and thetests/dependencieslock that the checks partition reads. An earlier run on this branch alone overrode only the root input, so those partitions then ran against the caisson they pin.🤖 Generated with Claude Code