diff --git a/.devcontainer/dev_shell/devcontainer-feature.json b/.devcontainer/dev_shell/devcontainer-feature.json index ab01809..62ddc72 100644 --- a/.devcontainer/dev_shell/devcontainer-feature.json +++ b/.devcontainer/dev_shell/devcontainer-feature.json @@ -2,8 +2,5 @@ "name": "DevShell", "id": "dev_shell", "version": "1.0.0", - "description": "A nix based dev shell", - "installsAfter": [ - "ghcr.io/devcontainers/features/nix:1" - ] + "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 index 30657a3..911923c 100644 --- a/.devcontainer/dev_shell/install.sh +++ b/.devcontainer/dev_shell/install.sh @@ -1,6 +1,4 @@ #!/bin/env sh -nix-env -i nixpkgs-fmt - -echo 'nix --experimental-features "nix-command flakes" develop' > /usr/bin/devShell -chmod +x /usr/bin/devShell \ No newline at end of file +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 891d654..24044ad 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,29 +1,37 @@ { "name": "Ubuntu", "image": "mcr.microsoft.com/devcontainers/base:jammy", + // Features to add to the dev container. More info: https://containers.dev/implementors/features. "features": { "ghcr.io/devcontainers/features/docker-from-docker:1": {}, "ghcr.io/devcontainers/features/nix:1": {}, "./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. // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - //"onCreateCommand":"nix-env -i nixpkgs-fmt", + "postCreateCommand": ".devcontainer/postCreateCommand.sh", // Configure tool-specific properties. "customizations": { // Configure properties specific to VS Code. "vscode": { // 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": [ - "donjayamanne.githistory", "jnoortheen.nix-ide", "ms-azuretools.vscode-docker", "eamodio.gitlens", - "streetsidesoftware.code-spell-checker" + "streetsidesoftware.code-spell-checker", + "timonwong.shellcheck", + "foxundermoon.shell-format" ] } } diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 0000000..e0d4895 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,3 @@ +#!/bin/env sh + +nix-env -i nixpkgs-fmt diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 3ca342b..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "terminal.integrated.profiles.linux": { - "dev": { - "path": "/usr/bin/devShell", - "icon": "terminal-bash" - } - }, - "terminal.integrated.defaultProfile.linux": "dev" -} \ No newline at end of file diff --git a/flake.lock b/flake.lock index 8de3b17..bcb4a4e 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1667254466, - "narHash": "sha256-YrMQzDVOo+uz5gg1REj2q/uVhJE3WcpkqGiMzh3Da3o=", + "lastModified": 1668595291, + "narHash": "sha256-j8cyfbtT5sAYPYwbERgTDzfD48ZernL0/V668eGpXAM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1b4722674c315de0e191d0d79790b4eac51570a1", + "rev": "6474d93e007e4d165bcf48e7f87de2175c93d10b", "type": "github" }, "original": {