Generate flake.nix from module options. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ dendrix.oeiuwq.com/Dendritic.html
dendritic nix inputs
at main 38 lines 856 B view raw
1{ inputs, lib, ... }: 2{ 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 38}