From 5feeb4eef875067e46d6b730139a9ef6db3633a4 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 7 Jul 2024 15:23:09 -0400 Subject: [PATCH] flake/dev: make `treefmt-nix` optional as this isn't used by consumers, they should be able to remove this input via `inputs.nixvim.inputs.treefmt-nix.follows = ""` --- flake-modules/dev/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flake-modules/dev/default.nix b/flake-modules/dev/default.nix index 2116d035..72f3808a 100644 --- a/flake-modules/dev/default.nix +++ b/flake-modules/dev/default.nix @@ -1,9 +1,9 @@ { lib, inputs, ... }: { - imports = [ - inputs.treefmt-nix.flakeModule - ./devshell.nix - ] ++ lib.optional (inputs.git-hooks ? flakeModule) inputs.git-hooks.flakeModule; + imports = + [ ./devshell.nix ] + ++ lib.optional (inputs.git-hooks ? flakeModule) inputs.git-hooks.flakeModule + ++ lib.optional (inputs.treefmt-nix ? flakeModule) inputs.treefmt-nix.flakeModule; perSystem = { @@ -15,7 +15,7 @@ let fmt = pkgs.nixfmt-rfc-style; in - { + lib.optionalAttrs (inputs.treefmt-nix ? flakeModule) { treefmt.config = { projectRootFile = "flake.nix";