{"id":13686547,"url":"https://github.com/arrterian/nix-env-selector","last_synced_at":"2026-02-19T08:01:26.331Z","repository":{"id":36362298,"uuid":"211123794","full_name":"arrterian/nix-env-selector","owner":"arrterian","description":"Allows switch environment for Visual Studio Code using Nix Package Manager.","archived":false,"fork":false,"pushed_at":"2025-09-11T23:22:20.000Z","size":5841,"stargazers_count":234,"open_issues_count":21,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-20T21:37:25.785Z","etag":null,"topics":["ide","nix","nix-env","nix-flake","nix-shell","switch-environment","visual-studio-code","vsc","vscode-extension","workspace","workspace-env"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arrterian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":"https://secure.wayforpay.com/payment/selector"}},"created_at":"2019-09-26T15:36:28.000Z","updated_at":"2025-09-27T22:35:00.000Z","dependencies_parsed_at":"2024-01-13T17:01:01.444Z","dependency_job_id":"5452fbff-4909-4275-b5e7-1889d504e98d","html_url":"https://github.com/arrterian/nix-env-selector","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/arrterian/nix-env-selector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrterian%2Fnix-env-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrterian%2Fnix-env-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrterian%2Fnix-env-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrterian%2Fnix-env-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arrterian","download_url":"https://codeload.github.com/arrterian/nix-env-selector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrterian%2Fnix-env-selector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29608152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ide","nix","nix-env","nix-flake","nix-shell","switch-environment","visual-studio-code","vsc","vscode-extension","workspace","workspace-env"],"created_at":"2024-08-02T15:00:34.814Z","updated_at":"2026-02-19T08:01:26.314Z","avatar_url":"https://github.com/arrterian.png","language":"Clojure","funding_links":["https://secure.wayforpay.com/payment/selector"],"categories":["Clojure","vscode-extension"],"sub_categories":[],"readme":"# 🇺🇦 Support Ukraine 🇺🇦\nHi folks,\nMy name is Roman Valihura. I'm the author of this extension. I'm Ukrainian.\nI was born in Ukraine. I'm living here at the moment.\n\nAs you all know Russia invaded my country.\nRussia has already killed thousands of civilians and continues the war and terror in Ukraine.\nI have the luck that my region is pretty far from the frontline. But even here, I'm living in the air-alarm reality.\nThe reality where you should wake up in the middle of the night and go into the shelter. Because a rocket flies over your region.\n\n\nLike a lot of Ukrainians now I became a volunteer in this hard time for my country.\nWe with a team producing Individual First Aid Kits for the Ukrainian army.\nIf you have a wish and ability to support the activity, you can make a donation on our website, which we made to collect funds for producing First Aid Kits.\n\nMore datails on the [aidkit.shop](https://aidkit.shop)\n\nThank you for your attention!\n\n\n# Nix Environment Selector\n\n\u003cp align=\"center\"\u003e\n  \u003cimg\n    width=\"200\"\n    height=\"200\"\n    src=\"https://raw.githubusercontent.com/arrterian/nix-env-selector/master/resources/icon.png\"\n    alt=\"nix-env-selector-logo\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Extension that lets you use environments declared in \u003ckbd\u003e.nix\u003c/kbd\u003e files in Visual Studio Code.\n\u003c/p\u003e\n\n## Motivation\n\nNix package manager provides a way of creating isolated\nenvironments with a specific configuration of packages.\nThese environments are usually activated in the terminal\nand are not convenient to use within an IDE.\n\nOne option is to run `nix-shell` on the command line and then\nlaunch `code` within the activated shell.\nHowever, this process can quickly become tedious.\n`Nix Environment Selector` provides an alternative: can automatically apply the environment.\n\n## Getting started\n\n-   Install [Nix package manager](https://nixos.org/nix/).\n-   Restart VS Code (to make sure that `nix-shell` is in the PATH)\n-   [Install the extension](https://marketplace.visualstudio.com/items?itemName=arrterian.nix-env-selector).\n-   Create the Nix environment config (like `default.nix` or `shell.nix` or `flake.nix`) in\n    the root of your project's workspace.\n-   Open Command Palette (\u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eP\u003c/kbd\u003e)\n    and run `Nix-Env: Select Environment` command.\n-   Choose the Nix environment you'd like to apply.\n-   Wait for the environment to build.\n-   Restart VS Code to apply the built environment.\n\n## Example\n\n### Haskell project\n\nTo run a Haskell application you need to have **GHC** (Haskell compiler) installed.\nWith Nix package manager we can create an isolated environment containing only\nthe GHC version and the dependencies that the project needs without\npolluting the user's environment.\n\nEnvironment configuration in `shell.nix`:\n\n```nix\n{ pkgs ? import \u003cnixpkgs\u003e { } }:\nwith pkgs;\n\nlet\n  haskellDeps = ps: with ps; [\n    base\n    lens\n    mtl\n    random\n  ];\n  haskellEnv = haskell.packages.ghc865.ghcWithPackages haskellDeps;\nin mkShell {\n  buildInputs = [\n    haskellEnv\n    haskellPackages.cabal-install\n    gdb\n  ];\n}\n```\n\nNow let's try to open our project in Visual Studio Code.\n\n![Without Env Demo](resources/without-env-demo.gif)\n\nAs you can see VS Code can't find the GHC compiler. Let's apply\nthe environment declared in `shell.nix`.\n\n![With Env Demo](resources/with-env-demo.gif)\n\nBingo 🎉🎉🎉. Everything is working now 😈\n\n## Configuration\n\nYou can configure the extension in `.vscode/settings.json`\nfile (located in the root of the workspace). Here are the configuration settings:\n\n| Setting                       | Default | Description                                                   |\n| ----------------------------- | ------- | ------------------------------------------------------------- |\n| `nixEnvSelector.nixFile`      | null    | Path to the Nix config file                                   |\n| `nixEnvSelector.packages`     | []      | List packages using as `-p` nix-shell args                    |\n| `nixEnvSelector.args`         | null    | Custom args string for nix-shell. EX: `-A \u003csomething\u003e --pure` |\n| `nixEnvSelector.nixShellPath` | null    | Custom path for nix-shell executable                          |\n| `nixEnvSelector.useFlakes` | false    | Enable support for `flake.nix`                          |\n\n\n## Supported Platforms\n\n-   MacOS\n-   Linux\n-   Windows (with `Remote - WSL` extension)\n\n## Support\n\nIf you like the extension and want to support author, click the button bellow.\n\n\u003ca\n  href=\"https://secure.wayforpay.com/payment/selector\"\n  alt=\"donate\"\u003e\n  \u003cimg\n      width=\"170\"\n      height=\"35\"\n      src=\"https://raw.githubusercontent.com/arrterian/nix-env-selector/master/resources/donate-wfp.png\"\n      alt=\"donate\"/\u003e\n\u003c/a\u003e\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrterian%2Fnix-env-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farrterian%2Fnix-env-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrterian%2Fnix-env-selector/lists"}