mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-09 08:08:34 +01:00
The alias should be dropped only once `pkgs.nixfmt` is unlikely to be nixfmt-classic. I.e. after nixfmt 1.0 is in a stable release, but before the nixfmt-rfc-style alias starts warning. See https://github.com/NixOS/nixpkgs/issues/425583
37 lines
1.2 KiB
JSON
37 lines
1.2 KiB
JSON
{
|
|
"name": "nixpkgs",
|
|
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
|
|
"features": {
|
|
"ghcr.io/devcontainers/features/nix:1": {
|
|
// fails in the devcontainer sandbox, enable sandbox via config instead
|
|
"multiUser": false,
|
|
// TODO: nixfmt-rfc-style → nixfmt (once it's in a stable release)
|
|
// https://github.com/NixOS/nixpkgs/issues/425583
|
|
"packages": "nixpkgs.nixd,nixpkgs.nixfmt-rfc-style",
|
|
"useAttributePath": true,
|
|
"extraNixConfig": "experimental-features = nix-command flakes,sandbox = true"
|
|
}
|
|
},
|
|
// Fixup permissions inside container.
|
|
// https://github.com/NixOS/nix/issues/6680#issuecomment-1230902525
|
|
"postCreateCommand": "sudo apt-get install -y acl",
|
|
"postStartCommand": "sudo setfacl -k /tmp; if [ -e /dev/kvm ]; then sudo chgrp $(id -g) /dev/kvm; fi",
|
|
"customizations": {
|
|
"vscode": {
|
|
"extensions": [
|
|
"jnoortheen.nix-ide"
|
|
],
|
|
"settings": {
|
|
"[nix]": {
|
|
"editor.formatOnSave": true
|
|
},
|
|
"nix.enableLanguageServer": true,
|
|
"nix.serverPath": "nixd"
|
|
}
|
|
}
|
|
},
|
|
"remoteEnv": {
|
|
"NIXPKGS": "/workspaces/nixpkgs"
|
|
}
|
|
}
|