Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Oct 11, 2024
2 parents 036b94b + f74cb29 commit 3715972
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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-24.05"; # or "unstable"

# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.dotnet-sdk_8
];

# Sets environment variables in the workspace
env = {};
idx = {
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
extensions = [
# "muhammad-sammy.csharp"
];

# 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
cwd = "./MyApp";
command = [
"dotnet"
"watch"
"--urls=http://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
cwd = "./MyApp";
# 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";
};
};
};
}

0 comments on commit 3715972

Please sign in to comment.