-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
46 lines (39 loc) · 1.15 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 = "A collection of packages to support RK3588(S)-based SBCs";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
};
outputs = inputs @ { self, nixpkgs, ...}: let
mkPkgs = system: (
import nixpkgs {
localSystem = system;
crossSystem = "aarch64-linux";
}
);
forAllSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
] (system: function (mkPkgs system));
in {
packages = forAllSystems (pkgs: import ./packages { inherit self pkgs; } );
nixosModules = (import ./modules) self;
checks = forAllSystems (pkgs: {
orangepi-5 = (pkgs.nixos [
self.nixosModules.orangepi-5
{ system.stateVersion = "24.11"; }
]).config.system.build.sdImage;
orangepi-5-plus = (pkgs.nixos [
self.nixosModules.orangepi-5-plus
{ system.stateVersion = "24.11"; }
]).config.system.build.sdImage;
});
templates = rec {
default = orangepi-5x;
orangepi-5x = {
path = ./templates/orangepi-5x;
description = "A template for Orange Pi 5 family of SBCs";
};
};
};
}