blob: ba19638e2b897bc7fc08120262992c9b7467e0f5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{
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
];
};
checks.formatting = treefmtEval.config.build.check self;
formatter = treefmtEval.config.build.wrapper;
})
// {inherit templates;};
}
# vim: ts=2
|