forked from ealasu/nixos-nanopi-r4se
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
45 lines (43 loc) · 1.22 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
{
description = "NanoPi R4Se example";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
};
outputs = { self, nixpkgs }:
let
pkgs = import "${nixpkgs}" {
system = "aarch64-linux";
config.allowUnfree = true;
};
exampleBase = {
system = "aarch64-linux";
modules = [
# Common system modules...
./baseline.nix
];
};
in {
nixosConfiguration = nixpkgs.lib.nixosSystem {
inherit (exampleBase) system;
modules = exampleBase.modules ++ [
# Modules for installed systems only.
];
};
sd = nixpkgs.lib.nixosSystem {
inherit (exampleBase) system;
modules = exampleBase.modules ++ [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image.nix"
./sd-image.nix
];
};
uboot = (pkgs.buildUBoot {
defconfig = "nanopi-r4se-rk3399_defconfig";
extraPatches = [ ./patches/arm64-rk3399-Add-support-NanoPi-R4s.patch ];
extraMeta = {
platforms = [ "aarch64-linux" ];
};
BL31 = "${pkgs.armTrustedFirmwareRK3399}/bl31.elf";
filesToInstall = [ "spl/u-boot-spl.bin" "u-boot.itb" "idbloader.img"];
});
};
}