-
Notifications
You must be signed in to change notification settings - Fork 70
/
flake.nix
53 lines (43 loc) · 1.44 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
48
49
50
51
52
53
{
description = "Build Android (AOSP) using Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
androidPkgs.url = "github:tadfisher/android-nixpkgs/stable";
flake-compat.url = "github:nix-community/flake-compat";
};
outputs = { self, nixpkgs, nixpkgs-unstable, androidPkgs, flake-compat, ... }@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;
gitRepo = pkgs.gitRepo;
};
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 pup jq
shellcheck
wget
# For chromium updater script
# python2
cipd git
cachix
];
PYTHONPATH=./scripts;
};
};
}