Add the step-agent NixOS module, and align with the upstream NUR layout - #17
Open
tashian wants to merge 1 commit into
Open
Add the step-agent NixOS module, and align with the upstream NUR layout#17tashian wants to merge 1 commit into
tashian wants to merge 1 commit into
Conversation
Installing pkgs.step-agent gets you the binary and nothing that runs it: no
service, no system user, no PKCS#11 socket, no polkit rules. Customers have
been getting that from a hand-uploaded file on files.smallstep.com with no copy
in version control. It belongs beside the systemd units it translates, so
smallstep/agent owns it as extra/step-agent.nix and mirrors it here -- this
repository is where it is public, and where flake users can import it.
modules/ was still the untouched NUR template stub, so this also takes the
rename the template made since we forked it: nixos-modules/ and nixosModules,
which is the attribute consumers expect. Both reserved-name filters move with
it -- ci.nix would otherwise treat nixosModules as a package and try to build
it, and overlay.nix would splice it into the overlay as one.
flake.nix now exports nixosModules directly rather than through
legacyPackages.<system>, since a NixOS module is the same expression on every
platform and importing one should not instantiate nixpkgs. That is what makes
the documented import read
imports = [ inputs.smallstep.nixosModules.step-agent ];
dopey
approved these changes
Aug 25, 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.
Pairs with smallstep/agent#1200, which is where the module is maintained. Merge that one first or together — its mirror workflow targets
nixos-modules/step-agent.nix, the path this PR creates.Why
Installing
pkgs.step-agentgets you the binary and nothing that runs it — no service, no system user, no PKCS#11 socket, no polkit rules. Customers have been getting that fromfiles.smallstep.com/step-agent.nix, an object uploaded to S3 by hand on 2026-07-30 with no copy in any repo and no review on changes. It belongs beside the systemd units it translates, sosmallstep/agentowns it asextra/step-agent.nix; this repository is where it becomes public and importable.What's here
nixos-modules/step-agent.nix— the module, reconciled against the agent's current units (it now includes the PKCS#11 socket, and no longer orders the service afternetwork-online.target, which was an EAP-TLS boot deadlock).modules/→nixos-modules/,modules→nixosModules—modules/default.nixwas still the untouched NUR template stub (one commit, "Initial commit"), and upstreamnur-packages-templatehas since made this rename. Taking it now, while nothing depends on the old name, is cheaper than after we publish a URL.ci.nix/overlay.nix— both carryisReserved = n: n == "lib" || n == "overlays" || n == "modules". Without moving these,ci.nixwould treatnixosModulesas a package and try to build it, andoverlay.nixwould splice it into the overlay as one.flake.nix— exportsnixosModulesdirectly instead of only throughlegacyPackages.<system>. A NixOS module is the same expression on every platform and importing one shouldn't instantiate nixpkgs; this is what makes the import readimports = [ inputs.smallstep.nixosModules.step-agent ];.README.md— a NixOS module section. The existing walkthrough installs the package and stops, so it left users with a binary and no running agent.Verification
Evaluated against
nixos-unstablein anixos/nixcontainer:Note
This repository has no LICENSE — it's public, unlicensed, and about to be the canonical place we point NixOS customers at. Worth settling separately; upstream's template ships MIT, but that's a call for someone else to make.