From e37fcd22deb2864a274cc8a470d807e450f9725e Mon Sep 17 00:00:00 2001
From: amadejkastelic7 <amadejkastelic7@gmail.com>
Date: Sun, 16 Jun 2024 13:54:12 +0000
Subject: [PATCH] Add google idx config

---
 .idx/dev.nix | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 .idx/dev.nix

diff --git a/.idx/dev.nix b/.idx/dev.nix
new file mode 100644
index 0000000..6fe6980
--- /dev/null
+++ b/.idx/dev.nix
@@ -0,0 +1,54 @@
+# To learn more about how to use Nix to configure your environment
+# see: https://developers.google.com/idx/guides/customize-idx-env
+{ pkgs, ... }: {
+  channel = "unstable";
+
+  # Use https://search.nixos.org/packages to find packages
+  packages = [
+    pkgs.python311
+    pkgs.python311Packages.pip
+    pkgs.pipenv
+  ];
+
+  # Sets environment variables in the workspace
+  env = {};
+  idx = {
+    # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
+    extensions = [
+      "ms-python.python"
+      "ms-python.debugpy"
+      "ms-python.black-formatter"
+      "ms-python.pylint"
+    ];
+
+    # 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 = {
+        pipenv-install = "pipenv install --dev";
+      };
+      # 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";
+      };
+    };
+  };
+}