From 503808cc85ceefe21e036b71de7a8a0c6a2a0001 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Sat, 20 May 2023 19:59:23 +0200 Subject: [PATCH] update template --- .../dev_shell/devcontainer-feature.json | 6 ---- .devcontainer/dev_shell/install.sh | 4 --- .devcontainer/devcontainer.json | 30 +++++++++---------- .devcontainer/postCreateCommand.sh | 3 -- .vscode/settings.json | 9 ++++++ 5 files changed, 24 insertions(+), 28 deletions(-) delete mode 100644 .devcontainer/dev_shell/devcontainer-feature.json delete mode 100644 .devcontainer/dev_shell/install.sh delete mode 100755 .devcontainer/postCreateCommand.sh create mode 100644 .vscode/settings.json diff --git a/.devcontainer/dev_shell/devcontainer-feature.json b/.devcontainer/dev_shell/devcontainer-feature.json deleted file mode 100644 index 62ddc72..0000000 --- a/.devcontainer/dev_shell/devcontainer-feature.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "DevShell", - "id": "dev_shell", - "version": "1.0.0", - "description": "A nix based dev shell" -} \ No newline at end of file diff --git a/.devcontainer/dev_shell/install.sh b/.devcontainer/dev_shell/install.sh deleted file mode 100644 index 911923c..0000000 --- a/.devcontainer/dev_shell/install.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/env sh - -echo 'nix --experimental-features "nix-command flakes" develop' >/usr/bin/devShell -chmod +x /usr/bin/devShell diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 24044ad..83a1938 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,29 +1,28 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/alpine { - "name": "Ubuntu", - "image": "mcr.microsoft.com/devcontainers/base:jammy", - // Features to add to the dev container. More info: https://containers.dev/implementors/features. + "name": "Alpine", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:alpine-3.17", "features": { - "ghcr.io/devcontainers/features/docker-from-docker:1": {}, - "ghcr.io/devcontainers/features/nix:1": {}, - "./dev_shell": {} + "ghcr.io/devcontainers/features/nix:1": {} }, + // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": ".devcontainer/postCreateCommand.sh", + // "postCreateCommand": "nix-env -i nixpkgs-fmt", + // Configure tool-specific properties. "customizations": { // Configure properties specific to VS Code. "vscode": { // Set *default* container specific settings.json values on container create. "settings": { - "terminal.integrated.profiles.linux": { - "dev": { - "path": "/usr/bin/devShell", - "icon": "terminal-bash" - } - }, - "terminal.integrated.defaultProfile.linux": "dev" + "settings": { + "terminal.integrated.defaultProfile.linux": "dev-shell" + } }, "extensions": [ "jnoortheen.nix-ide", @@ -35,6 +34,7 @@ ] } } + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" -} \ No newline at end of file +} diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh deleted file mode 100755 index e0d4895..0000000 --- a/.devcontainer/postCreateCommand.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/env sh - -nix-env -i nixpkgs-fmt diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1e84508 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "terminal.integrated.profiles.linux": { + "dev-shell": { + "path": "bash", + "args": [ "-c", "nix --experimental-features \"nix-command flakes\" develop"], + "overrideName": true + } + } +} \ No newline at end of file