From c418b11c65de29301290501d96f28fae662e245e Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 5 Oct 2024 10:34:48 -0700 Subject: clean up the devshell setup --- nix/flake/devshell.nix | 79 +++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 42 deletions(-) (limited to 'nix') diff --git a/nix/flake/devshell.nix b/nix/flake/devshell.nix index be0c763..8fb0c2c 100644 --- a/nix/flake/devshell.nix +++ b/nix/flake/devshell.nix @@ -5,54 +5,49 @@ inputs.pre-commit-hooks.flakeModule ]; - perSystem = - { config - , pkgs - , ... - }: { - devshells.default = { - name = "world"; - devshell.startup.pre-commit.text = config.pre-commit.installationScript; - packages = with pkgs; [ - (config.treefmt.build.wrapper) - python3 - just - pandoc - nixos-rebuild - ]; - env = [ - { - name = "DEVSHELL_NO_MOTD"; - value = "1"; - } - ]; - }; + perSystem = { config, pkgs, ... }: { + devshells.default = { + name = "world"; + devshell.startup.pre-commit.text = config.pre-commit.installationScript; + packages = with pkgs; [ + (config.treefmt.build.wrapper) + python3 + just + pandoc + nixos-rebuild + ]; + env = [{ + name = "DEVSHELL_NO_MOTD"; + value = "1"; + }]; + }; - treefmt = { - projectRootFile = ".git/config"; + treefmt = { - flakeFormatter = true; - flakeCheck = true; + projectRootFile = ".git/config"; - # list of supported programs - # https://github.com/numtide/treefmt-nix - programs = { - nixpkgs-fmt.enable = true; - shfmt.enable = true; - taplo.enable = true; - ruff.enable = true; - yamlfmt.enable = true; - }; + flakeFormatter = true; + flakeCheck = true; + + # list of supported programs + # https://github.com/numtide/treefmt-nix + programs = { + nixpkgs-fmt.enable = true; + shfmt.enable = true; + taplo.enable = true; + ruff.enable = true; + yamlfmt.enable = true; }; + }; - pre-commit = { - check.enable = true; - settings = { - hooks = { - deadnix.enable = true; - treefmt.enable = true; - }; + pre-commit = { + check.enable = true; + settings = { + hooks = { + deadnix.enable = true; + treefmt.enable = true; }; }; }; + }; } -- cgit 1.4.1