aboutsummaryrefslogtreecommitdiff
path: root/docs/nixos-rebuild-remote.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/nixos-rebuild-remote.adoc')
-rw-r--r--docs/nixos-rebuild-remote.adoc39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/nixos-rebuild-remote.adoc b/docs/nixos-rebuild-remote.adoc
new file mode 100644
index 0000000..4794b37
--- /dev/null
+++ b/docs/nixos-rebuild-remote.adoc
@@ -0,0 +1,39 @@
+= NixOS rebuild remotely
+
+The suggested way to update NixOS on Turris is to build system on more powerful
+device and push only resulting build to the device. The reason for this are
+memory requirements for Nix itself. NixOS and its packages repository evaluation
+consumes a lot of memory and thus doing that on different PC is just faster.
+
+Prepare directory where you are going to be managing your Turris device(s) and
+paste this `flake.nix` file in it:
+
+[source,nix]
+----
+{
+ description = "Turris system management flake";
+
+ inputs = {
+ nixturris.url = "git+https://git.cynerd.cz/nixturris";
+ };
+
+ outputs = { self, nixpkgs, flake-utils, nixturris }:
+ with flake-utils.lib;
+ {
+ nixosConfigurations.turris = nixturris.lib.nixturrisSystem {
+ nixpkgs = nixpkgs;
+ board = "mox"; <1>
+ modules = [
+ # Place for your modules
+ ];
+ };
+ };
+}
+----
+
+<1> Declares board type. Change to `omnia` if you are managing Turris Omnia.
+
+**TODO** describe here how to generate key, sign build and distribute it to the
+device.
+
+To update system before build run `nix flake update`.