Skip to content

fix(policy): normalize nix profile paths to tilde-style and add defexpr - #822

Merged
lukehinds merged 1 commit into
nolabs-ai:mainfrom
marksisson:main
May 5, 2026
Merged

fix(policy): normalize nix profile paths to tilde-style and add defexpr#822
lukehinds merged 1 commit into
nolabs-ai:mainfrom
marksisson:main

Conversation

@marksisson

Copy link
Copy Markdown
Contributor

Replace $HOME/.local/state/nix/profiles with ~/.local/state/nix/profiles for consistency with the other tilde-style paths in the nix group, and add ~/.local/state/nix/defexpr alongside ~/.nix-defexpr to cover the modern XDG directory profile layout.

Copilot AI review requested due to automatic review settings May 4, 2026 13:57
@marksisson marksisson changed the title policy: normalize nix profile paths to tilde-style and add defexpr fix: normalize nix profile paths to tilde-style and add defexpr May 4, 2026
@github-actions github-actions Bot added the bug Something isn't working label May 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the embedded Nix runtime policy in nono-cli so home-relative Nix paths use a consistent tilde form and modern XDG state locations are covered alongside the legacy locations.

Changes:

  • Replaced the Nix profiles entry from $HOME/.local/state/nix/profiles to ~/.local/state/nix/profiles.
  • Added ~/.local/state/nix/defexpr next to the existing legacy ~/.nix-defexpr entry.
  • Kept the rest of the nix_runtime read allowlist unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/nono-cli/data/policy.json
@marksisson marksisson changed the title fix: normalize nix profile paths to tilde-style and add defexpr fix(policy): normalize nix profile paths to tilde-style and add defexpr May 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Nix read policy to include modern XDG-compliant directory paths and standardizes the use of the tilde character for home directory references. A review comment suggests adding the singular profile path to ensure complete support for the modern Nix directory layout.

Comment thread crates/nono-cli/data/policy.json
@marksisson
marksisson marked this pull request as draft May 4, 2026 14:14
@marksisson
marksisson marked this pull request as ready for review May 4, 2026 14:29
@marksisson

Copy link
Copy Markdown
Contributor Author

I think this PR could also just have ~/.local/state/nix, and not specify the profiles and defexpr subdirectories. But without comments in the policy.json, I wonder if the intent/need for the allow read for ~/.local/state/nix would be clear?

@marksisson

marksisson commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

Some notes I am using...

# user's current profile/generation
~/.nix-profile                # default
~/.local/state/nix/profile    # XDG

# user's current nix channel
~/.nix-defexpr                # default
~/.local/state/nix/defexpr    # XDG

# user's profile generations
/etc/profiles/per-user        # default
~/.local/state/nix/profiles   # XDG

# system's current profile/generation (./bin is system PATH environment)
/run/current-system/sw

# core profile storage (including system profile generations and root user profiles)
/nix/var/nix/profiles

## everything above is eventually symlinked to the following location
/nix/store                    # conanical artifact storage

@marksisson

Copy link
Copy Markdown
Contributor Author

Depends on #830

@marksisson
marksisson marked this pull request as ready for review May 4, 2026 20:06
Replace $HOME/.local/state/nix/profiles with ~/.local/state/nix/profiles
for consistency with the other tilde-style paths in the nix group, and
add ~/.local/state/nix/defexpr alongside ~/.nix-defexpr to cover the
modern nix-command profile layout.

Signed-off-by: Mark Sisson <5761292+marksisson@users.noreply.github.com>
@lukehinds
lukehinds merged commit f276100 into nolabs-ai:main May 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants