Skip to content

fix(apply): reduce restrictions on certain options#168

Merged
water-sucks merged 1 commit intonix-community:mainfrom
Sporif:apply-fix-reduce-restrictions-on-options
Feb 7, 2026
Merged

fix(apply): reduce restrictions on certain options#168
water-sucks merged 1 commit intonix-community:mainfrom
Sporif:apply-fix-reduce-restrictions-on-options

Conversation

@Sporif
Copy link
Copy Markdown
Collaborator

@Sporif Sporif commented Feb 6, 2026

  • Allow passing --no-activate and --no-boot without having to specify --output or --dry.
    It is useful to just test your configuration builds without creating a gc root and cluttering the filesystem.

  • When only building, print a log message to indicate the store path built.
    This is mainly for when --output is not set, but I think it's useful to always show it when building only e.g., to be able to quickly copy the built store path for use in other commands. Also, nixos-rebuild-ng does this (and shows the store path even when switching).

  • Allow setting --output with --build-host and/or --target-host
    To allow re-using aliases that set --output ./result with remote builds or activation.

  • Don't change the working directory, it's not necessary for getting the latest commit message.

  • Don't unnecessarily combine the output path with the working directory.
    These last two changes are unrelated but I think they simplify the code at no cost. Happy to remove them if it should be a separate PR or if they are actually necessary.

 - Allow passing `--no-activate` and `--no-boot` without having
   to specify `--output` or `--dry`
 - When only building, print a log message to indicate the store path
   built.
 - Allow setting `--output` with `--build-host` and/or `--target-host`
 - Don't change the working directory, it's not necessary for getting
   the latest commit message.
 - Don't unnecessarily combine the output path with the working directory.
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks left a comment

Choose a reason for hiding this comment

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

Frankly, I'm not sure why I kept the CWD change in this; this was an artifact of the Zig -> Go port since it was necessary over there for a reason I don't remember.

This totally works! Makes it simpler to grok so I'm good with it.

@water-sucks water-sucks merged commit 043816c into nix-community:main Feb 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants