summaryrefslogtreecommitdiffstats
path: root/flake.nix
blob: ccd6110432d27f8ae04905a922c3384d0b9aec0f (plain)
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
{
  description = "A basic example robotnix configuration";

  inputs.robotnix.url = "github:danielfullmer/robotnix";

  outputs = { self, robotnix }:
    let
      common = {
        apps = {
          bromite.enable = true;
          fdroid.enable = true;
          seedvault.enable = true;
        };

        microg.enable = true;

        webview.bromite = {
          enable = true;
          availableByDefault = true;
        };

        # signing.enable = true;
        # signing.keyStorePath = "/var/secrets/android-keys"; # A _string_ of the path for the key store.

        # Build with ccache
        ccache.enable = true;
      };
    in
    {
      # "dailydriver" is an arbitrary user-chosen name for this particular
      # configuration.  Change it to something meaningful for you, perhaps just
      # the device name if you only have one of this kind of device.
      robotnixConfigurations.fp3 = robotnix.lib.robotnixSystem ({ config, pkgs, ... }: {
        device = "FP3";
        flavor = "lineageos";
      } // common);

      robotnixConfigurations.fp2 = robotnix.lib.robotnixSystem ({ config, pkgs, ... }: {
        device = "FP2";
        flavor = "lineageos";
      } // common);

      # This provides a convenient output which allows you to build the image by
      # simply running "nix build" on this flake.
      # Build other outputs with (for example): "nix build .#robotnixConfigurations.dailydriver.ota"
      defaultPackage.x86_64-linux = self.robotnixConfigurations.fp3.img;

      hydraJobs.robotnixConfigurations = {
        fp3 = {
          inherit (self.robotnixConfigurations.fp3)
            bootImg
            factoryImg
            img
            ota;
        };
        fp2 = {
          inherit (self.robotnixConfigurations.fp2)
            bootImg
            factoryImg
            img
            ota;
        };
      };
    };
}