1
0

update template

This commit is contained in:
2022-11-17 21:36:05 +00:00
parent eec6c3b2ff
commit 23bca91323
6 changed files with 23 additions and 26 deletions

View File

@@ -2,8 +2,5 @@
"name": "DevShell", "name": "DevShell",
"id": "dev_shell", "id": "dev_shell",
"version": "1.0.0", "version": "1.0.0",
"description": "A nix based dev shell", "description": "A nix based dev shell"
"installsAfter": [
"ghcr.io/devcontainers/features/nix:1"
]
} }

View File

@@ -1,6 +1,4 @@
#!/bin/env sh #!/bin/env sh
nix-env -i nixpkgs-fmt echo 'nix --experimental-features "nix-command flakes" develop' >/usr/bin/devShell
chmod +x /usr/bin/devShell
echo 'nix --experimental-features "nix-command flakes" develop' > /usr/bin/devShell
chmod +x /usr/bin/devShell

View File

@@ -1,29 +1,37 @@
{ {
"name": "Ubuntu", "name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/base:jammy", "image": "mcr.microsoft.com/devcontainers/base:jammy",
// Features to add to the dev container. More info: https://containers.dev/implementors/features.
"features": { "features": {
"ghcr.io/devcontainers/features/docker-from-docker:1": {}, "ghcr.io/devcontainers/features/docker-from-docker:1": {},
"ghcr.io/devcontainers/features/nix:1": {}, "ghcr.io/devcontainers/features/nix:1": {},
"./dev_shell": {} "./dev_shell": {}
}, },
// Features to add to the dev container. More info: https://containers.dev/implementors/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [], // "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
//"onCreateCommand":"nix-env -i nixpkgs-fmt", "postCreateCommand": ".devcontainer/postCreateCommand.sh",
// Configure tool-specific properties. // Configure tool-specific properties.
"customizations": { "customizations": {
// Configure properties specific to VS Code. // Configure properties specific to VS Code.
"vscode": { "vscode": {
// Set *default* container specific settings.json values on container create. // Set *default* container specific settings.json values on container create.
"settings": {}, "settings": {
"terminal.integrated.profiles.linux": {
"dev": {
"path": "/usr/bin/devShell",
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.linux": "dev"
},
"extensions": [ "extensions": [
"donjayamanne.githistory",
"jnoortheen.nix-ide", "jnoortheen.nix-ide",
"ms-azuretools.vscode-docker", "ms-azuretools.vscode-docker",
"eamodio.gitlens", "eamodio.gitlens",
"streetsidesoftware.code-spell-checker" "streetsidesoftware.code-spell-checker",
"timonwong.shellcheck",
"foxundermoon.shell-format"
] ]
} }
} }

View File

@@ -0,0 +1,3 @@
#!/bin/env sh
nix-env -i nixpkgs-fmt

View File

@@ -1,9 +0,0 @@
{
"terminal.integrated.profiles.linux": {
"dev": {
"path": "/usr/bin/devShell",
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.linux": "dev"
}

6
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1667254466, "lastModified": 1668595291,
"narHash": "sha256-YrMQzDVOo+uz5gg1REj2q/uVhJE3WcpkqGiMzh3Da3o=", "narHash": "sha256-j8cyfbtT5sAYPYwbERgTDzfD48ZernL0/V668eGpXAM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1b4722674c315de0e191d0d79790b4eac51570a1", "rev": "6474d93e007e4d165bcf48e7f87de2175c93d10b",
"type": "github" "type": "github"
}, },
"original": { "original": {