Generate flake.nix from module options. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ dendrix.oeiuwq.com/Dendritic.html
dendritic nix inputs

Remove formatter.nix and nix-auto-follow from the Dendritic module (#44)

* Remove formatter.nix and nix-auto-follow from the Dendritic module

* Remove treefmt configuration from dev

* Add treefmt configuration back to dev

authored by teamwolfyta.tngl.sh and committed by

GitHub d05fa344 6a7da815

+37 -44
+1 -4
README.md
··· 18 18 `lib.mkDefault` or anything you normally do with Nix modules, and have them reflected in flake schema values. 19 19 20 20 <table><tr><td> 21 - 21 + 22 22 ## Features 23 23 24 24 - Flake definition aggregated from all flake-parts modules. ··· 142 142 143 143 - Includes flakeModules.default. 144 144 - Includes flakeModules.import-tree. 145 - - Includes flakeModules.nix-auto-follow. 146 145 - Enables [`flake-parts`](https://github.com/hercules-ci/flake-parts). 147 146 - Enables [`flake-aspects`](https://github.com/vic/flake-aspects). 148 147 - Enables [`den`](https://github.com/vic/den). 149 148 - Sets `outputs` to `inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules)`. 150 - - Adds `treefmt-nix` input. 151 - - Enables formatters: `nixfmt`, `deadnix`, `prettier` and `nixf-diagnose`. 152 149 153 150 ### Flake Templates 154 151
+36 -2
dev/modules/formatter.nix
··· 1 - { inputs, ... }: 1 + { inputs, lib, ... }: 2 2 { 3 - perSystem.treefmt.projectRoot = inputs.flake-file; 3 + 4 + imports = [ 5 + inputs.flake-file.flakeModules.nix-auto-follow 6 + inputs.treefmt-nix.flakeModule 7 + ]; 8 + 9 + flake-file.inputs = { 10 + treefmt-nix.url = lib.mkDefault "github:numtide/treefmt-nix"; 11 + treefmt-nix.inputs.nixpkgs.follows = lib.mkDefault "nixpkgs"; 12 + }; 13 + 14 + perSystem = 15 + { self', ... }: 16 + { 17 + packages.fmt = self'.formatter; 18 + treefmt = { 19 + projectRoot = inputs.flake-file; 20 + programs = { 21 + nixfmt.enable = true; 22 + deadnix.enable = true; 23 + nixf-diagnose.enable = true; 24 + prettier.enable = true; 25 + }; 26 + settings.on-unmatched = lib.mkDefault "fatal"; 27 + settings.global.excludes = [ 28 + "LICENSE" 29 + "flake.lock" 30 + "*/flake.lock" 31 + ".envrc" 32 + ".direnv/*" 33 + "*/.gitignore" 34 + ]; 35 + }; 36 + }; 37 + 4 38 }
-1
modules/dendritic/basic.nix
··· 4 4 imports = [ 5 5 inputs.flake-file.flakeModules.default 6 6 inputs.flake-file.flakeModules.import-tree 7 - inputs.flake-file.flakeModules.nix-auto-follow 8 7 ]; 9 8 10 9 flake-file.inputs = {
-1
modules/dendritic/default.nix
··· 3 3 imports = [ 4 4 ./dendritic.nix 5 5 ./basic.nix 6 - ./formatter.nix 7 6 ./nixpkgs.nix 8 7 ./systems.nix 9 8 ];
-36
modules/dendritic/formatter.nix
··· 1 - { inputs, lib, ... }: 2 - { 3 - 4 - imports = [ 5 - inputs.treefmt-nix.flakeModule 6 - ]; 7 - 8 - flake-file.inputs = { 9 - treefmt-nix.url = lib.mkDefault "github:numtide/treefmt-nix"; 10 - treefmt-nix.inputs.nixpkgs.follows = lib.mkDefault "nixpkgs"; 11 - }; 12 - 13 - perSystem = 14 - { self', ... }: 15 - { 16 - packages.fmt = self'.formatter; 17 - treefmt = { 18 - programs = { 19 - nixfmt.enable = true; 20 - deadnix.enable = true; 21 - nixf-diagnose.enable = true; 22 - prettier.enable = true; 23 - }; 24 - settings.on-unmatched = lib.mkDefault "fatal"; 25 - settings.global.excludes = [ 26 - "LICENSE" 27 - "flake.lock" 28 - "*/flake.lock" 29 - ".envrc" 30 - ".direnv/*" 31 - "*/.gitignore" 32 - ]; 33 - }; 34 - }; 35 - 36 - }