Created
May 30, 2024 13:41
-
-
Save arifnd/c4dc9977bd4dfd00521d7732d1af98b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To learn more about how to use Nix to configure your environment | |
| # see: https://developers.google.com/idx/guides/customize-idx-env | |
| { pkgs, ... }: { | |
| # Which nixpkgs channel to use. | |
| channel = "stable-23.11"; # or "unstable" | |
| # Use https://search.nixos.org/packages to find packages | |
| packages = [ | |
| pkgs.php82 | |
| pkgs.php82Packages.composer | |
| # pkgs.go | |
| # pkgs.python311 | |
| # pkgs.python311Packages.pip | |
| # pkgs.nodejs_20 | |
| # pkgs.nodePackages.nodemon | |
| ]; | |
| # Sets environment variables in the workspace | |
| env = {}; | |
| idx = { | |
| # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" | |
| extensions = [ | |
| # "vscodevim.vim" | |
| ]; | |
| # Enable previews | |
| previews = { | |
| enable = true; | |
| previews = { | |
| web = { | |
| # Example: run "npm run dev" with PORT set to IDX's defined port for previews, | |
| # and show it in IDX's web preview panel | |
| command = ["php" "-S" "localhost:$PORT"]; | |
| manager = "web"; | |
| # env = { | |
| # # Environment variables to set for your server | |
| # PORT = "$PORT"; | |
| # }; | |
| }; | |
| }; | |
| }; | |
| # Workspace lifecycle hooks | |
| workspace = { | |
| # Runs when a workspace is first created | |
| onCreate = { | |
| # Example: install JS dependencies from NPM | |
| # npm-install = "npm install"; | |
| }; | |
| # Runs when the workspace is (re)started | |
| onStart = { | |
| # Example: start a background task to watch and re-build backend code | |
| # watch-backend = "npm run watch-backend"; | |
| }; | |
| }; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment