Skip to content

[UX] Better info for untrusted users #8248

@angerman

Description

@angerman

Since 2.14, we have

warn("ignoring untrusted substituter '%s', you are not a trusted user.\n"
from @rapenne-s (#7461), which adds "you are not a trusted user." to the warning, which is already a good improvement.

ignoring untrusted substituter 'https://bleh.cachix.org', you are not a trusted user.

From user (most who use nix out of necessity, not because they like it particularly much) reports we know that this warning is

  1. ignored.
  2. not sufficiently helpful
    • What is a trusted user? (where do I find out more?)
    • How do I rectify this? (also, I don't really care about the details, just make it work!)

It might be more helpful to (our) users if there was a message right at the start along the lines of:

You are not a trusted-user as per your /etc/nix/nix.conf.  This means you won't be able to use 
substitutes not listed in your /etc/nix/nix.conf (even if you say you trust them).  The flake you
are about to load has a few settings that require a trusted user.

Please add $(whoami) to your nix.conf
<insert diff of current nix.conf to nix.conf with $(whoami) added>

If you do not want to see this message again, please set NIX_NO_ADVISE, or (some /etc/nix/nix.conf) flag.

Do you want to continue? y/N

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions