tangled
alpha
login
or
join now
comet.sh
/
atex
24
fork
atom
An Elixir toolkit for the AT Protocol.
hexdocs.pm/atex
elixir
bluesky
atproto
decentralization
24
fork
atom
overview
issues
pulls
pipelines
chore: add treefmt
ovyerus.com
2 weeks ago
7d45f605
74d05f25
verified
This commit was signed with the committer's
known signature
.
ovyerus.com
SSH Key Fingerprint:
SHA256:mXbp9WNBIT0nRNe28t2hrxfSwnSX7UBeW2DVlIyf0uw=
+57
-2
3 changed files
expand all
collapse all
unified
split
flake.lock
flake.nix
treefmt.nix
+36
-1
flake.lock
reviewed
···
16
16
"type": "github"
17
17
}
18
18
},
19
19
+
"nixpkgs_2": {
20
20
+
"locked": {
21
21
+
"lastModified": 1770107345,
22
22
+
"narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=",
23
23
+
"owner": "nixos",
24
24
+
"repo": "nixpkgs",
25
25
+
"rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4",
26
26
+
"type": "github"
27
27
+
},
28
28
+
"original": {
29
29
+
"owner": "nixos",
30
30
+
"ref": "nixpkgs-unstable",
31
31
+
"repo": "nixpkgs",
32
32
+
"type": "github"
33
33
+
}
34
34
+
},
19
35
"root": {
20
36
"inputs": {
21
21
-
"nixpkgs": "nixpkgs"
37
37
+
"nixpkgs": "nixpkgs",
38
38
+
"treefmt-nix": "treefmt-nix"
39
39
+
}
40
40
+
},
41
41
+
"treefmt-nix": {
42
42
+
"inputs": {
43
43
+
"nixpkgs": "nixpkgs_2"
44
44
+
},
45
45
+
"locked": {
46
46
+
"lastModified": 1773297127,
47
47
+
"narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=",
48
48
+
"owner": "numtide",
49
49
+
"repo": "treefmt-nix",
50
50
+
"rev": "71b125cd05fbfd78cab3e070b73544abe24c5016",
51
51
+
"type": "github"
52
52
+
},
53
53
+
"original": {
54
54
+
"owner": "numtide",
55
55
+
"repo": "treefmt-nix",
56
56
+
"type": "github"
22
57
}
23
58
}
24
59
},
+13
-1
flake.nix
reviewed
···
1
1
{
2
2
inputs = {
3
3
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
4
4
+
treefmt-nix.url = "github:numtide/treefmt-nix";
4
5
};
5
6
6
6
-
outputs = {nixpkgs, ...}: let
7
7
+
outputs = {
8
8
+
self,
9
9
+
nixpkgs,
10
10
+
treefmt-nix,
11
11
+
...
12
12
+
}: let
7
13
forSystems = fn:
8
14
nixpkgs.lib.genAttrs [
9
15
"aarch64-linux"
···
12
18
"x86_64-linux"
13
19
] (system: fn nixpkgs.legacyPackages.${system});
14
20
defaultForSystems = fn: forSystems (pkgs: {default = fn pkgs;});
21
21
+
treefmtEval = forSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
15
22
in {
16
23
devShells = defaultForSystems (pkgs:
17
24
pkgs.mkShell {
18
25
nativeBuildInputs = with pkgs; [elixir erlang];
19
26
});
27
27
+
28
28
+
formatter = forSystems (pkgs: treefmtEval.${pkgs.stdenv.hostPlatform.system}.config.build.wrapper);
29
29
+
checks = forSystems (pkgs: {
30
30
+
formatting = treefmtEval.${pkgs.stdenv.hostPlatform.system}.config.build.check self;
31
31
+
});
20
32
};
21
33
}
+8
treefmt.nix
reviewed
···
1
1
+
{...}: {
2
2
+
projectRootFile = "flake.nix";
3
3
+
programs.alejandra.enable = true;
4
4
+
programs.mix-format.enable = true;
5
5
+
programs.prettier.enable = true;
6
6
+
7
7
+
settings.formatter.prettier.proseWrap = "always";
8
8
+
}