-
-
Notifications
You must be signed in to change notification settings - Fork 322
/
flake.nix
54 lines (47 loc) · 1.27 KB
/
flake.nix
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
51
52
53
54
{
description = "Wings";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {...} @ inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"];
imports = [
inputs.treefmt-nix.flakeModule
];
perSystem = {system, ...}: let
pkgs = import inputs.nixpkgs {inherit system;};
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
go_1_22
gofumpt
golangci-lint
gotools
];
};
treefmt = {
projectRootFile = "flake.nix";
programs = {
alejandra.enable = true;
deadnix.enable = true;
gofumpt = {
enable = true;
extra = true;
};
shellcheck.enable = true;
shfmt = {
enable = true;
indent_size = 0; # 0 causes shfmt to use tabs
};
yamlfmt.enable = true;
};
};
};
};
}