-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
34 lines (31 loc) · 929 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
### Install Angular LSP -- npm install -g @angular/language-service@next typescript @angular/language-server
{
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; };
outputs = { self, nixpkgs, ... }:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ ];
config = {
allowUnfree = true;
allowBroken = true;
};
};
in {
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
jq
nodePackages.yarn
nodePackages.prettier
];
shellHook = with pkgs; ''
export PATH="$PWD/node_modules/.bin/:$PATH"
alias scripts='jq ".scripts" package.json'
export PS1="(nodejs) \[\033[1;32m\][\u@\h:\w]\$\[\033[0m\]"
npm set prefix ~/.npm-global
export PATH=$PATH:~/.npm-global/bin
'';
};
};
}