-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathflake.nix
46 lines (45 loc) · 1.26 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
{
description = "Standar cross compile flake for Rust Lang Projects";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
crane.url = "github:ipetkov/crane";
fenix.url = "github:nix-community/fenix";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
...
} @ inputs: let
fenix = inputs.fenix.packages;
in
# Iterate over Arm, x86 for MacOs 🍎 and Linux 🐧
(flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
crane = inputs.crane.mkLib pkgs;
sssBundle = import ./nix {
inherit pkgs system crane fenix;
};
in {
inherit (sssBundle) apps packages devShells;
}
)) // (flake-utils.lib.eachDefaultSystemPassThrough (system: let
pkgs = nixpkgs.legacyPackages.${system};
crane = inputs.crane.mkLib pkgs;
in {
# Overlays
overlays.default = import ./nix/overlay.nix {
inherit crane fenix;
};
# nixosModules
nixosModules = {
default = import ./nix/nixos-module.nix {
inherit crane fenix;
};
home-manager = import ./nix/hm-module.nix {
inherit crane fenix;
};
};
}));
}