From 5efe18e222cd7a3632733acc3167408846df9298 Mon Sep 17 00:00:00 2001 From: Ricardo Band Date: Fri, 26 Jan 2024 14:18:46 +0100 Subject: [PATCH] add formatter to flake --- .forgejo/workflows/tests.yml | 15 +++++++++++++++ flake.nix | 8 +++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml index b207471..5c3b26f 100644 --- a/.forgejo/workflows/tests.yml +++ b/.forgejo/workflows/tests.yml @@ -6,6 +6,21 @@ on: workflow_dispatch: jobs: + nix: + runs-on: docker + container: + image: nix + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Nix doctor + run: nix doctor + - name: Check flake + run: nix flake check --all-systems + - name: Build flake + run: nix build --print-out-paths + - name: Flake info + run: nix flake info tests: runs-on: docker container: diff --git a/flake.nix b/flake.nix index f96694a..78e4a42 100644 --- a/flake.nix +++ b/flake.nix @@ -21,12 +21,14 @@ src = ./.; modules = ./gomod2nix.toml; }; - in { - defaultPackage = sanic; + in + { + packages.default = sanic; + formatter = pkgs.nixpkgs-fmt; devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ go - go-tools # staticcheck + go-tools # staticcheck gomod2nix.packages.${system}.default sanic ];