blob: 381c846c0e42d9317f8c7276ca98291e2fa1fc3e (
plain) (
tree)
|
|
{
description = "A collection of nix flake templates";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils = {
url = "github:numtide/flake-utils";
inputs = {
systems.follows = "systems";
};
};
systems = {
url = "github:nix-systems/x86_64-linux"; # only evaluate for this system
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = {
self,
nixpkgs,
flake-utils,
treefmt-nix,
...
}: let
templates = import ./templates.nix {inherit (nixpkgs) lib;};
in
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages."${system}";
treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
cocogitto
# needed for the `update_common_files` script
jq
];
};
checks.formatting = treefmtEval.config.build.check self;
formatter = treefmtEval.config.build.wrapper;
})
// {inherit templates;};
}
# vim: ts=2
|