From cba4549304dfca1941c5aa04857ddea9430fc387 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 2 Aug 2022 23:24:05 +0000 Subject: [PATCH] update README to describe configuration.nix --- README.md | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5adf547..4656ea0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # eufon -> *euphony*: _noun_ Harmonious arrangement of sounds in composition; a smooth and agreeable combination of articulate elements in any piece of writing. +**Broken, not ready for use** -A mostly Fennel-based graphical environment tailored for the Pinephone -(other Linux-based mobile devices exist). The principles we aspire to are +> *euphony*: _noun_ Harmonious aqrrangement of sounds in composition; a smooth and agreeable combination of articulate elements in any piece of writing. + +A mostly Fennel-based graphical environment tailored for Linux-based +mobile devices. The principles we aspire to are * "habitable software" - build the system in such a way that a technically competent user may change it to serve their needs, @@ -14,9 +16,38 @@ A mostly Fennel-based graphical environment tailored for the Pinephone hardware buttons, let's play to its strengths instead of compensating for its weaknesses -As of 2022 these principles are more aspirational than actual. +As of 2022 these principles are more aspirational than actual. _This +repo is basically in an advanced state of brokenness_ -## Running it +## Building for a device + +To build an image, unpack [Mobile NixOS](https://github.com/NixOS/mobile-nixos/) in a sibling directory +of this repo (so that `../mobile-nixos` addresses it) and then do +something like this (substituing an appropriate device name for +`motorola-potter`) + + $ nix-build ../mobile-nixos/ -I mobile-nixos-configuration=./configuration.nix --argstr device motorola-potter -A build.default + +You are warmly encouraged to refer to the [Mobile Nixos +docs](https://mobile.nixos.org/devices/) for how to use this image. + +Once you have your device up and running and you can ssh into it +somehow (this may take further research, again I invite you to look at +the Mobile Nixos site) then you should be able to use +`nix-copy-closure` to update it without reinstalling. + + $ phone=myphone.lan + $ nix-build ../mobile-nixos/ -I mobile-nixos-configuration=./configuration.nix --argstr device motorola-potter -A config.system.build.toplevel + $ nix-copy-closure --to root@${phone} --include-outputs \ + ./result && ssh root@${phone} \ + `readlink result`/bin/switch-to-configuration switch + + +## Running the shell/apps locally + +You may prefer to develop on a desktop device of some kind, especially +if you're changing C code and have that edit/compile run cycle to go +round. You can start the shell locally with $ nix-shell --run "kiwmi -c init.lua" @@ -50,7 +81,7 @@ can connect to and interact with a Fennel REPL. I use - gestures to switch view - gesture to launch terminal? - some way to kill an app - - kiwmi may or may not have touch support + - finish adding touch support to Kiwmi - https://github.com/buffet/kiwmi/pull/64 - [ ] some way to add launcher shortcuts for Fennel functions - [ ] hook up system to session bus, to handle incoming calls