-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix package manager users can setup a shell environnement based on a flake.nix file that describes tools and versions needed to dev and run the project, this flake contains: - nodejs 20 - npm - typescript language server - angular language service nix flakes combinated with direnv allow to open a project folder with automatic setup launch, creates en .envrc file and a .direnv directory. -> not every contributors use it and want to have those dotfiles, so it should be ignored by git. Co-authored-by: Uriel-Sautron <[email protected]>
- Loading branch information
1 parent
95a8445
commit a859bc0
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,7 @@ testem.log | |
Thumbs.db | ||
src/environments/*.tmp | ||
*.iml | ||
|
||
# direnv | ||
.envrc | ||
.direnv |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
description = "A flake for a TypeScript project"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = | ||
{ nixpkgs | ||
, flake-utils | ||
, ... | ||
}: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
}; | ||
node = pkgs.nodejs_20; | ||
nodePackages = pkgs.nodePackages.override { | ||
nodejs = node; | ||
}; | ||
angularLanguageServer = pkgs.angular-language-server; | ||
in | ||
{ | ||
devShell = pkgs.mkShell { | ||
buildInputs = [ | ||
node | ||
nodePackages.npm | ||
nodePackages.typescript | ||
nodePackages.typescript-language-server | ||
angularLanguageServer | ||
]; | ||
}; | ||
}); | ||
} |