-
Notifications
You must be signed in to change notification settings - Fork 9
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
Allow usage with nix daemon #45
base: master
Are you sure you want to change the base?
Conversation
This commit removes the restriction of running the project only via single-user nix installation. To ensure disruptor is run with appropriate settings, a comparison is made betweeen global nix configuration and those specified in scripts/nix.conf file - any differences is clearly communicated to user
Example of warning: $ ./nix-shell.sh
The configuration of host nix daemon differs from the expected one.
These are the offending settings:
{ keep-outputs = "'true' change to => 'false';"; require-sigs = "'false' change to => 'true';"; }
---
Please update your configuration otherwise the shell may not work as intended.
direnv: loading ~/projects/disruptor/.envrc
[nix-shell:~/projects/disruptor]$ |
49c1546
to
5198fb2
Compare
5198fb2
to
aece643
Compare
nix show-config --json > "${global_nix_conf_settings}" 2>/dev/null | ||
# shellcheck disable=SC2181 | ||
if [ $? -ne 0 ]; then | ||
fail "nix show-config command has failed. Please enable it by following this steps: https://nixos.wiki/wiki/Nix_command" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add --experimental-features nix-command
to the command above?
Also this condition can be reached in cases when installed nix version is below 2.4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add the flag, I have been stuck thinking about unprivledged user but in other cases it saves the user a trip to nix.conf.
As to nix version... isn't it available even in version 2.0?
https://github.com/NixOS/nix/blob/2.0/src/nix/show-config.cc
This change adds '--experimental-features nix-command' param to nix show-config invocation to address invocations of privileged users who have not yet enabled nix-command
I like where this is heading. I'm ok with merging these changes. However, I think large chunks of this solution could be moved to In general, as soon as we know that |
b7588d4
to
aec36d2
Compare
This commit removes the restriction of running the project only via single-user nix installation.
To ensure disruptor is run with appropriate settings, a comparison is made betweeen global nix configuration and those specified in scripts/nix.conf file - any differences is clearly communicated to user