devcontainers / devcontainers/features

extraNixConfig breaks package installation

Open
#1,727 1 comment 0 reactions 1 assignee Claimed by @V-Subhankar-infy View on GitHub
Dominant language
Shell
Stars
1.5k
Forks
621
Avg merge
2d 11h
Merged PRs (30d)
4

Description

I'm trying to build my devcontainer with the following features;

```json
"features": {
"ghcr.io/devcontainers/features/nix": {
"extraNixConfig": "experimental-features = nix-command flakes",
"packages": "nixd,nixfmt,nixos-rebuild-ng,openssh,git-crypt"
}
},
```

However, no packages are installed. If I remove `extraNixConfig` so that it's just the packages line, then it works correctly and installs the packages.
I have not been able to get this to work, and have had to resort to a fallback of `"postCreateCommand": "echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf",` to enable flake support.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.