mirror of
https://github.com/coder/coder.git
synced 2026-06-04 21:48:22 +00:00
fa99f6a200
Otherwise if for example you try to run `yarn storybook` it complains that the version of Node is wrong. `pnpm storybook` works fine and that is probably what we should actually use, but as long as we are installing Yarn and not restricting its use we might as well make it use the right version of Node.
88 lines
2.4 KiB
Nix
88 lines
2.4 KiB
Nix
{
|
||
description = "Development environments on your infrastructure";
|
||
|
||
inputs = {
|
||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||
flake-utils.url = "github:numtide/flake-utils";
|
||
drpc.url = "github:storj/drpc/v0.0.32";
|
||
};
|
||
|
||
outputs = { self, nixpkgs, flake-utils, drpc }:
|
||
flake-utils.lib.eachDefaultSystem (system:
|
||
let
|
||
# Workaround for: terraform has an unfree license (‘bsl11’), refusing to evaluate.
|
||
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
|
||
formatter = pkgs.nixpkgs-fmt;
|
||
nodejs = pkgs.nodejs-18_x;
|
||
yarn = pkgs.yarn.override { inherit nodejs; };
|
||
# Check in https://search.nixos.org/packages to find new packages.
|
||
# Use `nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update`
|
||
# to update the lock file if packages are out-of-date.
|
||
|
||
# From https://nixos.wiki/wiki/Google_Cloud_SDK
|
||
gdk = pkgs.google-cloud-sdk.withExtraComponents ([pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin]);
|
||
|
||
devShellPackages = with pkgs; [
|
||
bat
|
||
cairo
|
||
curl
|
||
drpc.defaultPackage.${system}
|
||
gcc
|
||
gdk
|
||
getopt
|
||
git
|
||
gh
|
||
gnumake
|
||
gnused
|
||
go_1_21
|
||
go-migrate
|
||
golangci-lint
|
||
gopls
|
||
gotestsum
|
||
jq
|
||
kubectl
|
||
kubectx
|
||
kubernetes-helm
|
||
less
|
||
# Needed for many LD system libs!
|
||
libuuid
|
||
mockgen
|
||
nfpm
|
||
nodejs
|
||
nodejs.pkgs.pnpm
|
||
nodejs.pkgs.prettier
|
||
nodejs.pkgs.typescript
|
||
nodejs.pkgs.typescript-language-server
|
||
openssh
|
||
openssl
|
||
pango
|
||
pixman
|
||
pkg-config
|
||
postgresql_13
|
||
protobuf
|
||
protoc-gen-go
|
||
ripgrep
|
||
sapling
|
||
shellcheck
|
||
shfmt
|
||
sqlc
|
||
# strace is not available on OSX
|
||
(if pkgs.stdenv.hostPlatform.isDarwin then null else strace)
|
||
terraform
|
||
typos
|
||
vim
|
||
wget
|
||
yarn
|
||
yq-go
|
||
zip
|
||
zsh
|
||
zstd
|
||
];
|
||
in
|
||
{
|
||
defaultPackage = formatter; # or replace it with your desired default package.
|
||
devShell = pkgs.mkShell { buildInputs = devShellPackages; };
|
||
}
|
||
);
|
||
}
|