From 89e4f584ccba6d3e65467409711c4ede3eaf5fef Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 19 Jul 2024 13:50:41 +0800 Subject: [PATCH] wrapper-manager-fds: update devshell --- Makefile | 5 +++++ shell.nix | 9 +++------ treefmt.toml | 8 ++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 treefmt.toml diff --git a/Makefile b/Makefile index e45c766..b002431 100644 --- a/Makefile +++ b/Makefile @@ -11,3 +11,8 @@ docs-build: .PHONY: update update: npins update + +# Ideally this should be done before committing. +.PHONY: format +format: + treefmt diff --git a/shell.nix b/shell.nix index d1cff49..c471c34 100644 --- a/shell.nix +++ b/shell.nix @@ -4,19 +4,16 @@ in { pkgs ? import sources.nixos-unstable { } }: let - websiteDevshell = import ./docs/shell.nix { inherit pkgs; }; + websitePkg = import ./docs { inherit pkgs; }; in pkgs.mkShell { - packages = with pkgs; [ - websiteDevshell + inputsFrom = [ websitePkg ]; + packages = with pkgs; [ npins treefmt nixpkgs-fmt - hugo - asciidoctor - # For easy validation of the test suite. yajsv jq diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 0000000..4deb3fd --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,8 @@ +[global] +excludes = [ + "npins/default.nix" +] + +[formatter.nix] +command = "nixfmt" +includes = [ "*.nix" ]