-
Notifications
You must be signed in to change notification settings - Fork 70
/
default.nix
94 lines (86 loc) · 2.67 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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# SPDX-FileCopyrightText: 2020 Daniel Fullmer and robotnix contributors
# SPDX-License-Identifier: MIT
{ configuration,
pkgs ? (import ./pkgs {}),
lib ? pkgs.lib
}:
let
inherit (lib) mkOption types;
eval = (lib.evalModules {
modules = [
({ config, ... }: {
options.nixpkgs.overlays = mkOption {
default = [];
type = types.listOf types.unspecified;
description = "Nixpkgs overlays to override the default packages used while building robotnix.";
};
config = {
_module.args = let
finalPkgs = pkgs.appendOverlays config.nixpkgs.overlays;
apks = import ./apks { pkgs = finalPkgs; };
robotnixlib = import ./lib lib;
in {
inherit apks lib robotnixlib;
pkgs = finalPkgs;
};
};
})
configuration
./flavors/anbox
./flavors/grapheneos
./flavors/grapheneos/kernel.nix
./flavors/lineageos
./flavors/vanilla
./flavors/vanilla/10
./flavors/vanilla/11
./flavors/vanilla/11/kernel
./flavors/vanilla/12
./flavors/waydroid
./modules/10
./modules/11
./modules/12
./modules/13
./modules/9
./modules/apps/auditor.nix
./modules/apps/chromium.nix
./modules/apps/fdroid.nix
./modules/apps/prebuilt.nix
./modules/apps/seedvault.nix
./modules/apps/updater.nix
./modules/apv
./modules/assertions.nix
./modules/base.nix
./modules/emulator.nix
./modules/envpackages.nix
./modules/etc.nix
./modules/framework.nix
./modules/hosts.nix
./modules/security-pki.nix
./modules/kernel.nix
./modules/microg.nix
./modules/pixel
./modules/pixel/active-edge.nix
./modules/pixel/driver-binaries.nix
./modules/release.nix
./modules/resources.nix
./modules/signing.nix
./modules/source.nix
./modules/webview.nix
];
});
# From nixpkgs/nixos/modules/system/activation/top-level.nix
failedAssertions = map (x: x.message) (lib.filter (x: !x.assertion) eval.config.assertions);
config = if failedAssertions != []
then throw "\nFailed assertions:\n${lib.concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"
else lib.showWarnings eval.config.warnings eval.config;
in {
inherit (eval) pkgs options;
inherit config;
# Things that are nice to have at the top-level, since they might get moved
# in the future:
inherit (config.build)
targetFiles unsignedTargetFiles signedTargetFiles
ota incrementalOta img factoryImg bootImg recoveryImg otaDir
releaseScript generateKeysScript verifyKeysScript
emulator;
}