-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerators.nix
37 lines (31 loc) · 884 Bytes
/
generators.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
{ self, nixpkgs, nix-on-droid, nix-prelude, nil, ... }@flakes:
let
inherit (import ./local-modules.nix) localModules;
in rec {
##
# Generic config generation
specialArgs = let
L = nix-prelude.lib;
local-lib = import ./lib {
inherit (nixpkgs) lib;
inherit L;
};
overlays = [
self.overlays.default
nil.overlays.default
];
in
{ inherit flakes overlays localModules local-lib L; };
mkNixosSystem = modules: nixpkgs.lib.nixosSystem {
inherit modules specialArgs;
};
mkAndroidEnv = modules: let
pkgs = import nixpkgs {
system = "aarch64-linux";
inherit (specialArgs) overlays;
};
in nix-on-droid.lib.nixOnDroidConfiguration {
inherit modules pkgs;
extraSpecialArgs = specialArgs;
};
}