feat(flake): expose defaultLifetime + extraArgs on nixosModules.default#42
Merged
Merged
Conversation
Mirror the homeManagerModule's `defaultLifetime` and `extraArgs` options on the system-scoped nixosModule so callers no longer have to override `systemd.user.services.gitway-agent.serviceConfig.ExecStart` with `lib.mkForce` to set a key TTL. ExecStart is now built with `lib.concatStringsSep` + `lib.optionals` in the same shape as the home-manager variant: `-t <seconds>` is appended only when `defaultLifetime != null`, and `extraArgs` is spliced after the TTL flag. Default behavior is unchanged when neither option is set. Surfaced from a downstream Lattice consumer that wanted a system-wide 24 h TTL via `services.gitway-agent.defaultLifetime = 86400` and was forced into a `mkForce` ExecStart override. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
de72cdb to
63021b4
Compare
4 tasks
UnbreakableMJ
added a commit
that referenced
this pull request
May 12, 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.
Summary
homeManagerModules.default'sdefaultLifetimeandextraArgsoptions onnixosModules.default, removing the need for downstreamlib.mkForceExecStart overrides to set a key TTL.lib.concatStringsSep+lib.optionalsin the same shape as the home-manager variant; default behavior is unchanged when neither option is set.[Unreleased].Motivation
A downstream Lattice consumer wanted system-scoped
services.gitway-agent.defaultLifetime = 86400(24 h) but the nixosModule'sExecStartwas hardcoded with no TTL flag, so the only path was alib.mkForceoverride ofsystemd.user.services.gitway-agent.serviceConfig.ExecStart. The two modules now expose the same surface area; pick the scope that suits your deployment without losing TTL / extra-flag control.Test plan
nix flake check --no-build— passes; only pre-existing warnings (homeManagerModulesnot in flake schema,apps.defaultlacksmeta) remain.services.gitway-agent.defaultLifetime = 86400;and confirmsystemctl --user cat gitway-agent.serviceshows-t 86400in ExecStart.services.gitway-agent.enable = true;with neither option set produces an ExecStart byte-identical to the previous hardcoded line (default-equivalence check).🤖 Generated with Claude Code