The file format is one key=val pair per line (\n-separated).
Preparation example:
mkdir -p env/github.com/gokrazy/timestamps
echo 'FOO=bar' > env/github.com/gokrazy/timestamps/env.txt
Packer example:
gokr-packer -update=yes -hostname=gokrazy \
github.com/gokrazy/breakglass \
github.com/gokrazy/timestamps \
github.com/gokrazy/serial-busybox
You can check the effect locally by adding -overwrite_init=/tmp/init.go to your
gokr-packer invocation and examining /tmp/init.go afterwards.
related to https://github.com/gokrazy/gokrazy/issues/65
The file format is one flag per line (\n-separated).
Preparation example:
mkdir -p flags/github.com/gokrazy/timestamps
echo '--ohai' > flags/github.com/gokrazy/timestamps/flags.txt
Packer example:
gokr-packer -update=yes -hostname=gokrazy \
github.com/gokrazy/breakglass \
github.com/gokrazy/timestamps \
github.com/gokrazy/serial-busybox
Resulting stderr:
1970/01/01 01:00:09 gokrazy: attempt 0, starting [/user/timestamps --ohai]
You can check the effect locally by adding -overwrite_init=/tmp/init.go to your
gokr-packer invocation and examining /tmp/init.go afterwards.
related to https://github.com/gokrazy/gokrazy/issues/65
The new `-tls` parameter is empty by default, retaining the current behavior (no change).
If `-tls=self-signed` is specified, the packer generates and signs a RSA4096 certificate, stored in the host-specific config directory, e.g. typically `~/.config/gokrazy/<hostname>/{cert,key}.pem` on Linux.
If `-tls=<certpath>[,<keypath>]` is specified, the packer uses the specified certificate and key.
When TLS is used, the certificate/key is included in the gokrazy root file system at `/etc/ssl/{web,web_key}.pem`.
To switch an unencrypted (HTTP) installation to HTTPS, use the `-insecure` flag for the first update, e.g.:
`gokr-packer -tls=self-signed -insecure …`
…then remove it for all subsequent updates, which will now be done via HTTPS:
`gokr-packer -tls=self-signed …`
The gokrazy configuration directory is named “gokrazy” underneath
https://golang.org/pkg/os/#UserConfigDir, which on Linux typically
resolves to ~/.config/gokrazy.
The global HTTP password stored in http-password.txt within that
directory will still be used, but in case a host-specific override
directory exists, that directory has priority.
E.g., if you wanted to set up a gokrazy installation named “dev”
for live-coding on a public twitch stream, you could:
% host_specific=~/.config/gokrazy/hosts/dev/
% mkdir -p $host_specific
% echo -n publicly-leaked-on-stream > $host_specific/http-password.txt
This technique was originally contributed by @janisstreib in
https://github.com/gokrazy/tools/pull/14
This makes the packer more flexible with regards to permissions: write
permissions for the target device are now sufficient.
The downside is that the SD card needs to be unplugged and re-plugged before the
persistent file system can be created (if desired).
related to https://github.com/gokrazy/tools/issues/9