Skip to content

Commit

Permalink
Add flake for local development
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldracula committed Jan 10, 2024
1 parent 28a73c6 commit b737a3c
Show file tree
Hide file tree
Showing 2 changed files with 183 additions and 0 deletions.
130 changes: 130 additions & 0 deletions flake.lock

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

53 changes: 53 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
description = "Flake for developing on nos-notification-service";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
devshell.url = "github:numtide/devshell";
};

outputs = { self, nixpkgs, flake-utils, devshell }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
];
};
in
{
devShells.default =
pkgs.devshell.mkShell {
name = "nos-notification-service";
packages = with pkgs; [
go
gopls
golangci-lint
gotools
go-tools
gosimports
];
commands = [
{
name = ''start'';
help = ''alias for `go run cmd/notification-service/main.go`'';
category = ''dev helpers'';
command = ''
go run cmd/notification-service/main.go
'';
}
{
name = ''lint'';
help = ''check style and formatting'';
category = ''dev helpers'';
command = ''
go vet ./...
golangci-lint run ./...
'';
}

];
};
});
}

0 comments on commit b737a3c

Please sign in to comment.