From b85a4c978afaee5918a1032d84e42ac244d2059d Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sat, 26 Jun 2021 10:28:30 +0200 Subject: initial commit --- .gitignore | 3 ++ flake.lock | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 50 ++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bde7b88 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +result +result-* +nixos.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 @@ +{ + "nodes": { + "androidPkgs": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1623960850, + "narHash": "sha256-mh2sqnweuITV4kFIK6a8wEeeY999DIHLrFE8dU2JiTM=", + "owner": "tadfisher", + "repo": "android-nixpkgs", + "rev": "a68fee88e480673ac0cd4de9113ad222ae8efc5a", + "type": "github" + }, + "original": { + "owner": "tadfisher", + "ref": "stable", + "repo": "android-nixpkgs", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1614513358, + "narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5466c5bbece17adaab2d82fae80b46e807611bf3", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1614989413, + "narHash": "sha256-g503bGSdVhLu2cKR5sHG8XetLFrVUzAL3+mrnQJpmdY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "102eb68ceecbbd32ab1906a53ef5a7269dc9794a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1623617138, + "narHash": "sha256-zd03k0aZWdE+JjZjVbsQGCKmc1C4HIwIbW7MbI9ym6s=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "93963c27b934f24289a94b9e3784d60a9b77e92c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-21.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "robotnix": { + "inputs": { + "androidPkgs": "androidPkgs", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1624350571, + "narHash": "sha256-0ivlp053fT5+SIyYe3gQyACqs3YZz5MNP3QT+hl9Py4=", + "owner": "danielfullmer", + "repo": "robotnix", + "rev": "c65ac9c1ec6d5147c36891e9eb140ed789d7da93", + "type": "github" + }, + "original": { + "owner": "danielfullmer", + "repo": "robotnix", + "type": "github" + } + }, + "root": { + "inputs": { + "robotnix": "robotnix" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c493fe4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,50 @@ +{ + 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 = { + inherit (self.robotnixConfigurations) fp2 fp3; + }; + }; +} -- cgit v1.2.3