From 1285614380a1b5c6261209dd5ca65925438ec441 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 4 Dec 2023 08:10:43 -0800 Subject: additional cleanup for flakes Move the host configuration to `flake/hosts.nix` to follow what we did with `devshell`. --- flake/devshell.nix | 55 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 24 deletions(-) (limited to 'flake/devshell.nix') diff --git a/flake/devshell.nix b/flake/devshell.nix index f096bfe..7b75417 100644 --- a/flake/devshell.nix +++ b/flake/devshell.nix @@ -5,37 +5,44 @@ inputs.pre-commit-hooks.flakeModule ]; - perSystem = { config, pkgs, inputs', ... }: { - devShells.default = pkgs.mkShell { - name = "dotfiles"; + perSystem = + { config + , inputs' + , pkgs + , ... + }: { + devshells.default = { + name = "world"; - packages = [ - ]; + packages = with pkgs; [ + ]; - TREEFMT_CONFIG_FILE = config.treefmt.build.configFile; - }; + commands = [ + { package = config.treefmt.build.wrapper; } + ]; + }; - treefmt = { - projectRootFile = ".git/config"; + treefmt = { + projectRootFile = ".git/config"; - # list of supported programs - # https://github.com/numtide/treefmt-nix - programs = { - nixpkgs-fmt.enable = true; - shfmt.enable = true; - yamlfmt.enable = true; - taplo.enable = true; + # list of supported programs + # https://github.com/numtide/treefmt-nix + programs = { + nixpkgs-fmt.enable = true; + shfmt.enable = true; + yamlfmt.enable = true; + taplo.enable = true; + }; }; - }; - pre-commit = { - settings = { - hooks = { - # deadnix.enable = true; - shellcheck.enable = true; - treefmt.enable = true; + pre-commit = { + settings = { + hooks = { + # deadnix.enable = true; + shellcheck.enable = true; + treefmt.enable = true; + }; }; }; }; - }; } -- cgit 1.4.1