Skip to content

chore: Add nix shell for simple development setup #3399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve nix style, flake output schema
  • Loading branch information
cmoog committed Aug 7, 2022
commit 98a015f832d8d87b545eb6df596fc0f2df8fcad4
58 changes: 43 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 42 additions & 47 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,51 @@
description = "Development environments on your infrastructure";

inputs = {
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
drpc = {
url = "github:storj/drpc";
inputs = {
nixpkgs.follows = "nixpkgs-unstable";
flake-utils.follows = "flake-utils";
};
};
drpc.url = "github:storj/drpc/v0.0.32";
};

outputs = { self, nixpkgs-unstable, flake-utils, drpc }:
outputs = { self, nixpkgs, flake-utils, drpc }:
flake-utils.lib.eachDefaultSystem (system:
with nixpkgs-unstable.legacyPackages.${system}; rec {
devShell =
let devtools = {};
in mkShell {
buildInputs = [
drpc.defaultPackage.${system}
];
nativeBuildInputs = [
go_1_19
gopls
nodejs
ripgrep
exa
bat
typos
git
nfpm
openssl
protoc-gen-go
go-migrate
gotestsum
goreleaser
sqlc
shfmt
terraform
shellcheck
golangci-lint
yarn
postgresql
helm
jq
zstd
zip
openssh
nodePackages.typescript
nodePackages.typescript-language-server
];
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
bat
drpc.defaultPackage.${system}
exa
git
go-migrate
go_1_19
golangci-lint
gopls
goreleaser
gotestsum
helm
jq
nfpm
nodePackages.typescript
nodePackages.typescript-language-server
nodejs
openssh
openssl
postgresql
protoc-gen-go
ripgrep
shellcheck
shfmt
sqlc
terraform
typos
yarn
zip
zstd
];
};
});
}
);
}
17 changes: 10 additions & 7 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
(import (
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz";
sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5"; }
) {
src = ./.;
}).shellNix
(import
(
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/b4a34015c698c7793d592d66adbab377907a2be8.tar.gz";
sha256 = "1qc703yg0babixi6wshn5wm2kgl5y1drcswgszh4xxzbrwkk9sv7";
}
)
{
src = ./.;
}).shellNix