forked from nix-community/robotnix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
47 lines (39 loc) · 1.3 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
47
{
description = "Build Android (AOSP) using Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
androidPkgs.url = "github:tadfisher/android-nixpkgs/stable";
};
outputs = { self, nixpkgs, androidPkgs, ... }@inputs: let
pkgs = import ./pkgs/default.nix { inherit inputs; };
in {
# robotnixSystem evaluates a robotnix configuration
lib.robotnixSystem = configuration: import ./default.nix {
inherit configuration pkgs;
};
defaultTemplate = {
path = ./template;
description = "A basic robotnix configuration";
};
nixosModule = import ./nixos; # Contains all robotnix nixos modules
nixosModules.attestation-server = import ./nixos/attestation-server/module.nix;
packages.x86_64-linux = {
manual = (import ./docs { inherit pkgs; }).manual;
};
devShell.x86_64-linux = pkgs.mkShell {
name = "robotnix-scripts";
nativeBuildInputs = with pkgs; [
# For android updater scripts
(python3.withPackages (p: with p; [ mypy flake8 pytest ]))
gitRepo nix-prefetch-git
curl go-pup jq
shellcheck
# For chromium updater script
python2 cipd git
cachix
];
PYTHONPATH=./scripts;
};
};
}