summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--flake.lock97
-rw-r--r--flake.nix50
3 files changed, 150 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bde7b88
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
1result
2result-*
3nixos.qcow2
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..7c0b827
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,97 @@
1{
2 "nodes": {
3 "androidPkgs": {
4 "inputs": {
5 "flake-utils": "flake-utils",
6 "nixpkgs": "nixpkgs"
7 },
8 "locked": {
9 "lastModified": 1623960850,
10 "narHash": "sha256-mh2sqnweuITV4kFIK6a8wEeeY999DIHLrFE8dU2JiTM=",
11 "owner": "tadfisher",
12 "repo": "android-nixpkgs",
13 "rev": "a68fee88e480673ac0cd4de9113ad222ae8efc5a",
14 "type": "github"
15 },
16 "original": {
17 "owner": "tadfisher",
18 "ref": "stable",
19 "repo": "android-nixpkgs",
20 "type": "github"
21 }
22 },
23 "flake-utils": {
24 "locked": {
25 "lastModified": 1614513358,
26 "narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=",
27 "owner": "numtide",
28 "repo": "flake-utils",
29 "rev": "5466c5bbece17adaab2d82fae80b46e807611bf3",
30 "type": "github"
31 },
32 "original": {
33 "owner": "numtide",
34 "repo": "flake-utils",
35 "type": "github"
36 }
37 },
38 "nixpkgs": {
39 "locked": {
40 "lastModified": 1614989413,
41 "narHash": "sha256-g503bGSdVhLu2cKR5sHG8XetLFrVUzAL3+mrnQJpmdY=",
42 "owner": "NixOS",
43 "repo": "nixpkgs",
44 "rev": "102eb68ceecbbd32ab1906a53ef5a7269dc9794a",
45 "type": "github"
46 },
47 "original": {
48 "owner": "NixOS",
49 "ref": "nixos-unstable",
50 "repo": "nixpkgs",
51 "type": "github"
52 }
53 },
54 "nixpkgs_2": {
55 "locked": {
56 "lastModified": 1623617138,
57 "narHash": "sha256-zd03k0aZWdE+JjZjVbsQGCKmc1C4HIwIbW7MbI9ym6s=",
58 "owner": "NixOS",
59 "repo": "nixpkgs",
60 "rev": "93963c27b934f24289a94b9e3784d60a9b77e92c",
61 "type": "github"
62 },
63 "original": {
64 "owner": "NixOS",
65 "ref": "nixos-21.05",
66 "repo": "nixpkgs",
67 "type": "github"
68 }
69 },
70 "robotnix": {
71 "inputs": {
72 "androidPkgs": "androidPkgs",
73 "nixpkgs": "nixpkgs_2"
74 },
75 "locked": {
76 "lastModified": 1624350571,
77 "narHash": "sha256-0ivlp053fT5+SIyYe3gQyACqs3YZz5MNP3QT+hl9Py4=",
78 "owner": "danielfullmer",
79 "repo": "robotnix",
80 "rev": "c65ac9c1ec6d5147c36891e9eb140ed789d7da93",
81 "type": "github"
82 },
83 "original": {
84 "owner": "danielfullmer",
85 "repo": "robotnix",
86 "type": "github"
87 }
88 },
89 "root": {
90 "inputs": {
91 "robotnix": "robotnix"
92 }
93 }
94 },
95 "root": "root",
96 "version": 7
97}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..c493fe4
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,50 @@
1{
2 description = "A basic example robotnix configuration";
3
4 inputs.robotnix.url = "github:danielfullmer/robotnix";
5
6 outputs = { self, robotnix }: let
7 common = {
8 apps = {
9 bromite.enable = true;
10 fdroid.enable = true;
11 seedvault.enable = true;
12 };
13
14 microg.enable = true;
15
16 webview.bromite = {
17 enable = true;
18 availableByDefault = true;
19 };
20
21 # signing.enable = true;
22 # signing.keyStorePath = "/var/secrets/android-keys"; # A _string_ of the path for the key store.
23
24 # Build with ccache
25 ccache.enable = true;
26 };
27 in {
28 # "dailydriver" is an arbitrary user-chosen name for this particular
29 # configuration. Change it to something meaningful for you, perhaps just
30 # the device name if you only have one of this kind of device.
31 robotnixConfigurations.fp3 = robotnix.lib.robotnixSystem ({ config, pkgs, ... }: {
32 device = "FP3";
33 flavor = "lineageos";
34 } // common);
35
36 robotnixConfigurations.fp2 = robotnix.lib.robotnixSystem ({ config, pkgs, ... }: {
37 device = "FP2";
38 flavor = "lineageos";
39 } // common);
40
41 # This provides a convenient output which allows you to build the image by
42 # simply running "nix build" on this flake.
43 # Build other outputs with (for example): "nix build .#robotnixConfigurations.dailydriver.ota"
44 defaultPackage.x86_64-linux = self.robotnixConfigurations.fp3.img;
45
46 hydraJobs.robotnixConfigurations = {
47 inherit (self.robotnixConfigurations) fp2 fp3;
48 };
49 };
50}