tangled
alpha
login
or
join now
tjh.dev
/
core
forked from
tangled.org/core
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
add rust bits to nix config
oppi.li
1 year ago
4ccb867a
79fa0499
+94
-26
3 changed files
expand all
collapse all
unified
split
flake.lock
flake.nix
rust-toolchain.toml
+43
-1
flake.lock
···
1
1
{
2
2
"nodes": {
3
3
+
"gitignore": {
4
4
+
"inputs": {
5
5
+
"nixpkgs": [
6
6
+
"nixpkgs"
7
7
+
]
8
8
+
},
9
9
+
"locked": {
10
10
+
"lastModified": 1709087332,
11
11
+
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
12
12
+
"owner": "hercules-ci",
13
13
+
"repo": "gitignore.nix",
14
14
+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
15
15
+
"type": "github"
16
16
+
},
17
17
+
"original": {
18
18
+
"owner": "hercules-ci",
19
19
+
"repo": "gitignore.nix",
20
20
+
"type": "github"
21
21
+
}
22
22
+
},
3
23
"nixpkgs": {
4
24
"locked": {
5
25
"lastModified": 1737753923,
···
17
37
},
18
38
"root": {
19
39
"inputs": {
20
20
-
"nixpkgs": "nixpkgs"
40
40
+
"gitignore": "gitignore",
41
41
+
"nixpkgs": "nixpkgs",
42
42
+
"rust-overlay": "rust-overlay"
43
43
+
}
44
44
+
},
45
45
+
"rust-overlay": {
46
46
+
"inputs": {
47
47
+
"nixpkgs": [
48
48
+
"nixpkgs"
49
49
+
]
50
50
+
},
51
51
+
"locked": {
52
52
+
"lastModified": 1737685583,
53
53
+
"narHash": "sha256-p+NVABRpGi+pT+xxf9HcLcFVxG6L+vEEy+NwzB9T0f8=",
54
54
+
"owner": "oxalica",
55
55
+
"repo": "rust-overlay",
56
56
+
"rev": "eb64cbcc8eee0fa87ebded92805280d2ec97415a",
57
57
+
"type": "github"
58
58
+
},
59
59
+
"original": {
60
60
+
"owner": "oxalica",
61
61
+
"repo": "rust-overlay",
62
62
+
"type": "github"
21
63
}
22
64
}
23
65
},
+47
-25
flake.nix
···
1
1
{
2
2
description = "atproto github";
3
3
4
4
-
inputs.nixpkgs.url = "github:nixos/nixpkgs";
4
4
+
inputs = {
5
5
+
nixpkgs.url = "github:nixos/nixpkgs";
5
6
6
6
-
outputs =
7
7
-
{ self
8
8
-
, nixpkgs
9
9
-
,
10
10
-
}:
11
11
-
let
12
12
-
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
13
13
-
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
14
14
-
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
15
15
-
in
16
16
-
{
17
17
-
defaultPackage = forAllSystems (system: self.packages.${system}.legit);
18
18
-
devShells = forAllSystems (system:
19
19
-
let
20
20
-
pkgs = nixpkgsFor.${system};
21
21
-
in
22
22
-
{
23
23
-
default = pkgs.mkShell {
24
24
-
nativeBuildInputs = with pkgs; [
25
25
-
go
26
26
-
air
27
27
-
];
28
28
-
};
29
29
-
});
7
7
+
gitignore = {
8
8
+
url = "github:hercules-ci/gitignore.nix";
9
9
+
inputs.nixpkgs.follows = "nixpkgs";
30
10
};
11
11
+
12
12
+
rust-overlay = {
13
13
+
url = "github:oxalica/rust-overlay";
14
14
+
inputs.nixpkgs.follows = "nixpkgs";
15
15
+
};
16
16
+
};
17
17
+
18
18
+
outputs = {
19
19
+
self,
20
20
+
nixpkgs,
21
21
+
gitignore,
22
22
+
rust-overlay,
23
23
+
}: let
24
24
+
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
25
25
+
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
26
26
+
nixpkgsFor = forAllSystems (system:
27
27
+
import nixpkgs {
28
28
+
inherit system;
29
29
+
overlays = [(import rust-overlay)];
30
30
+
});
31
31
+
in {
32
32
+
defaultPackage = forAllSystems (system: self.packages.${system}.legit);
33
33
+
formatter = forAllSystems (system: nixpkgsFor."${system}".alejandra);
34
34
+
devShells = forAllSystems (system: let
35
35
+
pkgs = nixpkgsFor.${system};
36
36
+
rust-bin = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
37
37
+
in {
38
38
+
default = pkgs.mkShell {
39
39
+
nativeBuildInputs = [
40
40
+
pkgs.go
41
41
+
pkgs.air
42
42
+
43
43
+
pkgs.bacon
44
44
+
rust-bin
45
45
+
pkgs.pkg-config
46
46
+
pkgs.openssl
47
47
+
];
48
48
+
RUST_LOG = "info";
49
49
+
RUST_BACKTRACE = 1;
50
50
+
};
51
51
+
});
52
52
+
};
31
53
}
+4
rust-toolchain.toml
···
1
1
+
[toolchain]
2
2
+
channel = "nightly-2025-01-20"
3
3
+
components = [ "rustfmt", "rustc", "rust-analyzer", "rust-src", "rust-std", "cargo" ]
4
4
+
profile = "default"