functional2: improve NixSettings
#846
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#846
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
Currently, the
NixSettings
class creates a string config which the environment variable is set to.This creates problems with current tests from the
functional
test-suit, which require default values and/or the existence of thenix.conf
file.Additionally the amount of options to set for the config is very limited, e.g. not allowing
extra-deprecated-features
turning thesandbox
on or off etc.Describe the solution you'd like
The implementation of
NixSettings
should be overhauled to write to thenix.conf
file instead of an environment variable and to support more settings.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
see
cat > "$NIX_CONF_DIR"/nix.conf <<EOF
build-users-group =
keep-derivations = false
sandbox = false
experimental-features = nix-command
gc-reserved-space = 0
substituters =
flake-registry = $TEST_ROOT/registry.json
show-trace = true
include nix.conf.extra
trusted-users = $(whoami || id -u)
EOF
cat > "$NIX_CONF_DIR"/nix.conf.extra <<EOF
fsync-metadata = false
extra-experimental-features = flakes
!include nix.conf.extra.not-there
EOF
for the defaults provided by
functional
(not all of them are sensible)having played around, trying to get the
why-depends
test to working, i'd like to see the following defaults:update:
sandbox-paths
should be left untouched,extra-sandbox-paths
should be initalized with the values being present inenv.path
This issue was mentioned on Gerrit on the following CLs:
yeah, it should probably be a serializer. idk if it needs to be written into a file, especially, since the env-var does work and has the exact same format. you can if you want, it does no harm.