-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
default.nix
46 lines (45 loc) · 1.42 KB
/
default.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
{ pkgs ? import ./nixpkgs.nix {} }:
let
nixpkgsPath = pkgs.path;
fromPkgs = path: pkgs.path + "/${path}";
evalConfig = import (fromPkgs "nixos/lib/eval-config.nix");
buildConfig = { system, configuration ? {} }:
evalConfig {
specialArgs = {
inherit nixpkgsPath;
};
modules= [
(./. + "/${system}.nix")
configuration
];
}
;
in
{
armv6l-linux = {
sdImage = (buildConfig {
system = "armv6l-linux";
configuration = (fromPkgs "nixos/modules/installer/sd-card/sd-image-raspberrypi.nix");
}).config.system.build.sdImage;
};
armv7l-linux = {
isoImage = (buildConfig {
system = "armv7l-linux";
configuration = (fromPkgs "nixos/modules/installer/cd-dvd/installation-cd-minimal.nix");
}).config.system.build.isoImage;
sdImage = (buildConfig {
system = "armv7l-linux";
configuration = (fromPkgs "nixos/modules/installer/sd-card/sd-image-armv7l-multiplatform-installer.nix");
}).config.system.build.sdImage;
};
aarch64-linux = {
isoImage = (buildConfig {
system = "aarch64-linux";
configuration = (fromPkgs "nixos/modules/installer/cd-dvd/installation-cd-minimal.nix");
}).config.system.build.isoImage;
sdImage = (buildConfig {
system = "aarch64-linux";
configuration = (fromPkgs "nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix");
}).config.system.build.sdImage;
};
}