From 8d6a662c71d24608daf93b51ca1d462a0d5725f9 Mon Sep 17 00:00:00 2001 From: bergere Date: Fri, 26 Jul 2024 12:36:05 +0000 Subject: [PATCH] idx adjustments --- .idx/dev.nix | 58 +++++++++++++++++++++ fixtures-code/process-compose-with-log.yaml | 2 +- process-compose.override.yaml | 2 +- process-compose.yaml | 2 +- 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 .idx/dev.nix diff --git a/.idx/dev.nix b/.idx/dev.nix new file mode 100644 index 0000000..7b06c04 --- /dev/null +++ b/.idx/dev.nix @@ -0,0 +1,58 @@ +# 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 = "unstable"; # or "unstable" + + # Use https://search.nixos.org/packages to find packages + packages = [ + pkgs.go + pkgs.gnumake + pkgs.zsh + # 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 = [ + "golang.go" + "wesbos.theme-cobalt2" + ]; + + # 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 = ["npm" "run" "dev"]; + # 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 + go-tidy = "go tidy"; + }; + # 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"; + }; + }; + }; +} diff --git a/fixtures-code/process-compose-with-log.yaml b/fixtures-code/process-compose-with-log.yaml index 75c68b1..01e955c 100644 --- a/fixtures-code/process-compose-with-log.yaml +++ b/fixtures-code/process-compose-with-log.yaml @@ -31,7 +31,7 @@ processes: condition: process_completed_successfully process5: - command: "python3 -c 'print(str(4+5))'" + command: "echo 9" availability: restart: "on_failure" backoff_seconds: 1 diff --git a/process-compose.override.yaml b/process-compose.override.yaml index 19b9fb4..e041de9 100644 --- a/process-compose.override.yaml +++ b/process-compose.override.yaml @@ -8,7 +8,7 @@ environment: log_location: ./pc.log disable_env_expansion: false shell: - shell_command: "zsh" + shell_command: "bash" shell_argument: "-c" vars: HI: Cool Dude diff --git a/process-compose.yaml b/process-compose.yaml index 332af1a..febdb4a 100644 --- a/process-compose.yaml +++ b/process-compose.yaml @@ -18,7 +18,7 @@ environment: - 'ABC=222' log_location: ./pc.log shell: - shell_command: "zsh" + shell_command: "bash" shell_argument: "-c" processes: