Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
71 lines (67 loc) · 2.41 KB
/
Copy pathflake.nix
File metadata and controls
71 lines (67 loc) · 2.41 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
description = "A basic flake for the EU EDGELESS project's MVP";
nixConfig = {
extra-substituters = [
"https://edgeless.cachix.org"
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"edgeless.cachix.org-1:CpGxIJOpDU+VmvGJSnSPCTFZ1rytGUFc/x7Op9T8t0I="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix/monthly";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, fenix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
toolchain = with fenix.packages.${system}; combine [
minimal.toolchain
targets.wasm32-unknown-unknown.latest.rust-std
];
nextless_node_packages = (import ./nix/packages/nextless_node.nix) {inherit pkgs toolchain;};
in {
packages = {
nextless_cli = (import ./nix/packages/nextless_cli.nix) {inherit pkgs toolchain;};
nextless_node = nextless_node_packages.nextless_node;
nextless_node_led_matrix = nextless_node_packages.nextless_node_led_matrix;
nextless_controller = (import ./nix/packages/nextless_controller.nix) {inherit pkgs toolchain;};
};
devShell = (import ./nix/devshell.nix) {inherit pkgs;};
}
) //
flake-utils.lib.eachSystem [
"x86_64-linux"
"aarch64-linux"
] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nextless_pkgs = self.packages.${system};
toolchain = with fenix.packages.${system}; combine [
minimal.toolchain
targets.wasm32-unknown-unknown.latest.rust-std
];
in
{
containers = {
nextless_node = (import ./nix/containers/nextless_node.nix) {inherit pkgs nextless_pkgs;};
nextless_controller = (import ./nix/containers/nextless_controller.nix) {inherit pkgs nextless_pkgs;};
nextless_playground = (import ./nix/containers/nextless_playground.nix) {inherit pkgs nextless_pkgs toolchain system;};
};
}
) //
{
nixosModules = {
nextless = ./nix/nixos_module.nix;
default = self.nixosModules.nextless; # disko states this is a convention.
};
}
;
}