Skip to content

doc/src/modules: simplify usage of nix overrides - #2430

Draft
panchoh wants to merge 1 commit into
nix-community:masterfrom
panchoh:doc/simplify-usage-of--override-input
Draft

doc/src/modules: simplify usage of nix overrides#2430
panchoh wants to merge 1 commit into
nix-community:masterfrom
panchoh:doc/simplify-usage-of--override-input

Conversation

@panchoh

@panchoh panchoh commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

EDIT: Frozen until the minimal nix version reaches 2.34.

Path-like1 syntax is honoured by nix. This saves us a little typing.

Combined with tilde expansion by the shell, we go from:

nixos-rebuild switch --input-override stylix git+file:/home/user/path/to/stylix

to:

nixos-rebuild switch --input-override stylix ~/path/to/stylix

This is a follow-up of #1261.


Footnotes

  1. https://nix.dev/manual/nix/2.34/nix-2.34.html#path-like-syntax

  2. Checked manually following https://nix-community.github.io/stylix/development_environment.html#documentation

@stylix-automation stylix-automation Bot added the topic: documentation Documentation additions or improvements label Jul 30, 2026
@panchoh
panchoh marked this pull request as ready for review July 30, 2026 06:22

@trueNAHO trueNAHO left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path-like1 syntax is honoured by nix. This saves us a little typing.

Combined with tilde expansion by the shell, we go from:

nixos-rebuild switch --input-override stylix git+file:/home/user/path/to/stylix

to:

nixos-rebuild switch --input-override stylix ~/path/to/stylix

Thanks for submitting this simplification. Should we wait until this feature is supported by the minimum Nix version? For example, the internal path: simplification is intentionally postponed for the same reason:

  # We need to define the dev-flake-parts, dev-nixpkgs, and dev-systems inputs
  # so that other inputs can follow it. They are prefixed with 'dev-' to avoid
  # shadowing public flake inputs, which could affect local testing with
  # --override-input.
  #
  # TODO: Remove the /flake/dev/public-and-dev-version-consistency.nix checks
  #       and replace
  #
  #           [...]
  #
  #       with
  #
  #           [...]
  #
  #       once 26.05 is released, giving non-flake end-users and Stylix
  #       contributors two LTS releases to adopt Nix 2.26+ [1]. Note that
  #       non-nixpkgs public flake inputs should be disabled.
  #
  #       [1]: https://github.com/NixOS/nix/blob/d4f67fd46dfe2bc950bdfa14273f87b8a4c32e47/doc/manual/source/release-notes/rl-2.26.md?plain=1#L3-L11

-- /flake/dev/flake.nix:7

Footnotes

  1. https://nix.dev/manual/nix/2.34/nix-2.34.html#path-like-syntax

Comment thread doc/src/modules.md Outdated
@panchoh

panchoh commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Should we wait until this feature is supported by the minimum Nix version? For example, the internal path: simplification is intentionally postponed for the same reason:

  # We need to define the dev-flake-parts, dev-nixpkgs, and dev-systems inputs
  # so that other inputs can follow it. They are prefixed with 'dev-' to avoid
  # shadowing public flake inputs, which could affect local testing with
  # --override-input.
  #
  # TODO: Remove the /flake/dev/public-and-dev-version-consistency.nix checks
  #       and replace
  #
  #           [...]
  #
  #       with
  #
  #           [...]
  #
  #       once 26.05 is released, giving non-flake end-users and Stylix
  #       contributors two LTS releases to adopt Nix 2.26+ [1]. Note that
  #       non-nixpkgs public flake inputs should be disabled.
  #
  #       [1]: https://github.com/NixOS/nix/blob/d4f67fd46dfe2bc950bdfa14273f87b8a4c32e47/doc/manual/source/release-notes/rl-2.26.md?plain=1#L3-L11
> ```

Oh, I wasn’t aware of this. I just checked that nix on Nixpkgs is at 2.34.8 both in nixos-unstable and nixos-26.05.

EDIT: Note to self: I keep forgetting that there is a Nix audience outside of NixOS (droid, …) and thus it makes perfect sense to have Nix LTS releases with a different cadence than NixOS’

We’ll put it in the backburner, then.

Ah, sorry for the close + open, must have pressed the wrong button 😅

@panchoh panchoh closed this Jul 31, 2026
@panchoh panchoh reopened this Jul 31, 2026
@panchoh
panchoh marked this pull request as draft July 31, 2026 16:39
@panchoh
panchoh force-pushed the doc/simplify-usage-of--override-input branch 2 times, most recently from e55b8f0 to 2dad5cd Compare August 9, 2026 04:58
Path-like¹ syntax is honoured by nix.  This saves us a little typing.

¹: https://nix.dev/manual/nix/2.34/nix-2.34.html#path-like-syntax

Co-authored-by: Noah Biewesch <dev@noahbiewesch.com>
@panchoh
panchoh force-pushed the doc/simplify-usage-of--override-input branch from 2dad5cd to ad266e1 Compare August 9, 2026 04:59
@panchoh

panchoh commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

(due to a git misconfiguration on my part, I did a force-push which I shouldn’t have; the rest have been to restore the previous state, plus a rebase on top of master, which I intend to keep doing periodically until the time comes to bring this in. @trueNAHO, feel free to unsubscribe from the feed, I’ll ping you back once the time is right).

@panchoh

panchoh commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

(also, if you could mark the changes requested as done, we can clear that one out at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: documentation Documentation additions or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants