nixpkgs/.devcontainer/devcontainer.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1 KiB
JSON
Raw Permalink Normal View History

2022-11-17 12:35:00 +00:00
{
"name": "nixpkgs",
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"features": {
"ghcr.io/devcontainers/features/nix:1": {
2025-01-13 12:32:51 +01:00
// fails in the devcontainer sandbox, enable sandbox via config instead
"multiUser": false,
"packages": "nixpkgs.nixd,nixpkgs.nixfmt-rfc-style",
"useAttributePath": true,
2025-01-13 12:32:51 +01:00
"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",
2025-01-13 12:32:51 +01:00
"customizations": {
"vscode": {
"extensions": [
"jnoortheen.nix-ide"
],
"settings": {
"[nix]": {
"editor.formatOnSave": true
},
2025-01-13 12:32:51 +01:00
"nix.enableLanguageServer": true,
"nix.serverPath": "nixd"
}
2022-11-17 12:35:00 +00:00
}
},
"remoteEnv": {
"NIXPKGS": "/workspaces/nixpkgs"
}
}