From afa737d37b3be007af868c509ca7a32a60cf9544 Mon Sep 17 00:00:00 2001 From: Ayase Minori Date: Fri, 31 May 2024 01:20:25 +0800 Subject: [PATCH] Enable codespaces support for workspace (#17) This will allow Codespaces workspaces to load in the project with the devenv config Signed-off-by: Ayase Minori --- .devcontainer.json | 12 ++++++++++++ devenv.lock | 36 ++++++++++++++++++------------------ devenv.nix | 4 ++++ 3 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 .devcontainer.json diff --git a/.devcontainer.json b/.devcontainer.json new file mode 100644 index 0000000..2f69206 --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1,12 @@ +{ + "customizations": { + "vscode": { + "extensions": [ + "mkhl.direnv" + ] + } + }, + "image": "ghcr.io/cachix/devenv:latest", + "overrideCommand": false, + "updateContentCommand": "devenv test" +} diff --git a/devenv.lock b/devenv.lock index b4fcf23..dfe2f8d 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,11 +3,11 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1716095607, + "lastModified": 1716992392, "owner": "cachix", "repo": "devenv", - "rev": "32983f6dbc1583e333eaaf8126dc21dfbcbef291", - "treeHash": "6d5dd30b138123c570417f2bac23874d884674c7", + "rev": "2a8b6262ae00fc2f8b1b3a6ac35fdc0779085ee1", + "treeHash": "24309487ae9d41d1a7d788ac4c75ecb495eacab1", "type": "github" }, "original": { @@ -25,11 +25,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1716186410, + "lastModified": 1716877613, "owner": "nix-community", "repo": "fenix", - "rev": "49bf3506637ee9f30ab589104f479ec61db5924c", - "treeHash": "a3a8b7f63a007eefe2d3d80e298da3653b3c7716", + "rev": "08ea8011dd25421c104a5f44d16a713a27d93fde", + "treeHash": "7761561b72987080be37f0ce1a8e4f4e1fda0da2", "type": "github" }, "original": { @@ -77,11 +77,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1713361204, + "lastModified": 1716977621, "owner": "cachix", "repo": "devenv-nixpkgs", - "rev": "285676e87ad9f0ca23d8714a6ab61e7e027020c6", - "treeHash": "50354b35a3e0277d4a83a0a88fa0b0866b5f392f", + "rev": "4267e705586473d3e5c8d50299e71503f16a6fb6", + "treeHash": "6d9f1f7ca0faf1bc2eeb397c78a49623260d3412", "type": "github" }, "original": { @@ -93,11 +93,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1716061101, + "lastModified": 1716633019, "owner": "NixOS", "repo": "nixpkgs", - "rev": "e7cc61784ddf51c81487637b3031a6dd2d6673a2", - "treeHash": "0dfa8dcfb5f2b25b4be1a6f873c087557f335fac", + "rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e", + "treeHash": "9c88f2c9f0cdeaddeb5d49c2faaf65b936fc11d3", "type": "github" }, "original": { @@ -117,11 +117,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1715870890, + "lastModified": 1716213921, "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "fa606cccd7b0ccebe2880051208e4a0f61bfc8c1", - "treeHash": "ea38e19d9964cd72fb9936d75b9807756c754234", + "rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0", + "treeHash": "17b9f9f9983467bcff247b09761dca9831d3d3be", "type": "github" }, "original": { @@ -141,11 +141,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1716107283, + "lastModified": 1716828004, "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "21ec8f523812b88418b2bfc64240c62b3dd967bd", - "treeHash": "9919709f182ddef513a0602773fba1a13a970d5d", + "rev": "b32f181f477576bb203879f7539608f3327b6178", + "treeHash": "4b8a01567abe7a8fc5561563aa52ac6c029fb31d", "type": "github" }, "original": { diff --git a/devenv.nix b/devenv.nix index adc46bc..8b13f44 100644 --- a/devenv.nix +++ b/devenv.nix @@ -58,6 +58,10 @@ mold.enable = true; }; + # Enable Codespaces Integration + # https://devenv.sh/integrations/codespaces-devcontainer/ + devcontainer.enable = true; + # https://devenv.sh/pre-commit-hooks/ # pre-commit.hooks.shellcheck.enable = true;