Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix installer is way too verbose #6329

Open
edolstra opened this issue Mar 28, 2022 · 4 comments
Open

Nix installer is way too verbose #6329

edolstra opened this issue Mar 28, 2022 · 4 comments

Comments

@edolstra
Copy link
Member

Generally Unix commands should be quiet unless they have something interesting to say (like error messages). By contrast, the Nix installer prints hundreds of lines like:

~~> Setting up the build user nixbld31

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 31 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30031 --password ! nixbld31

Creating the Nix build user, nixbld31

           Created:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 31 nixbld31

in order to give nixbld31 a useful comment

usermod: no changes
              Note:     Nix build user 31
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

This drowns out useful information. I think it would be better to print only major steps and config info, e.g.

Unpacking /nix/store...
Creating nixbld* user accounts starting at UID 30000...
Installing systemd service /etc/systemd/system/nix-daemon.service...
Updating /etc/bash.bashrc...

If a command fails, the exact command should be printed. And maybe it could keep a log containing all executed commands.

@06kellyjac
Copy link
Member

👍 that'll make it more user friendly.
Might be worth having a verbose option though?

@abathur
Copy link
Member

abathur commented Mar 29, 2022

While it's still somewhat verbose, the multiuser installer does output less information when "headless" (when FD 0 is not open). This, for example, omits the sudo blocks like:

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 31 nixbld31

in order to give nixbld31 a useful comment

You can see an example of how it differs in any of the CI runs using install-nix-action, i.e. https://github.com/NixOS/nix/runs/5677772364?check_suite_focus=true#step:4:94

@tomberek
Copy link
Contributor

From NixUX:
Blocked until we have a better installation testing framework.

@abathur
Copy link
Member

abathur commented Apr 14, 2022

From NixUX: Blocked until we have a better installation testing framework.

FWIW there are a fair number of material installer improvents that are not technically hard that I personally consider to be ~blocked on better testing. The installer tests reduced uncertainty a lot--for the golden path. But most of the support load is in the edge cases.

@stale stale bot added the stale label Oct 30, 2022
@stale stale bot removed the stale label Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

5 participants