Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document 'GOKRAZY_PARENT_DIR' environment variable #222

Open
seanhagen opened this issue Sep 24, 2023 · 1 comment
Open

Document 'GOKRAZY_PARENT_DIR' environment variable #222

seanhagen opened this issue Sep 24, 2023 · 1 comment

Comments

@seanhagen
Copy link

I'm probably not the only person who doesn't want to have to use --parent_dir to specify a location each time we run gok because we don't want ( yet another ) directory created by an application in our home directory. For example, I have a directory for code projects: ~/Code, so I wanted to change the default parent directory from ~/gokrazy to ~/Code/GoKrazy.

I spent a long time searching to see if gok will optionally read from a config file in ~/.config/gok or something, before eventually finding the GOKRAZY_PARENT_DIR environment variable. Huzzah!

It would be nice if this was easier to find in the documentation -- or if there is a config file we could create in ~/.config/gok if that could be documented instead.

@seanhagen
Copy link
Author

Also, just found out that gok overwrite apparently doesn't fully use GOKRAZY_PARENT_DIR:

$ gok -i hello overwrite --full /dev/disk/by-id/wwn-0x5002538043584d30                                                                                                                                                                             Sun 24 Sep 2023 12:08:29 AM
gokrazy gok g231dea on GOARCH=amd64 GOOS=linux

Build target: CGO_ENABLED=0 GOARCH=arm64 GOOS=linux
Build timestamp: 2023-09-23T17:08:52-07:00
Loading system CA certificates from /etc/ssl/certs/ca-certificates.crt
Building 4 Go packages:

  github.com/gokrazy/fbstatus

  github.com/gokrazy/hello

  github.com/gokrazy/serial-busybox

  github.com/gokrazy/breakglass
    will be started with command-line flags
      from /home/sean/Code/GoKrazy/hello/config.json
      last modified: 2023-09-23T16:25:49-07:00 (43m4s ago)

[done] in 5.44s                        

Including extra files for Go packages:

  github.com/gokrazy/breakglass
    will include extra files in the root file system
      from /home/sean/Code/GoKrazy/hello/breakglass.authorized_keys
      last modified: 2023-09-23T16:25:49-07:00 (43m11s ago)

Including loadable kernel modules from:
/home/sean/Code/Go/pkg/mod/github.com/gokrazy/kernel@v0.0.0-20230920040557-40cc98addb83/lib/modules

Feature summary:
  use GPT: true
  use PARTUUID: true
  use GPT PARTUUID: true
2023/09/23 17:09:01 partitioning /dev/disk/by-id/wwn-0x5002538043584d30 (GPT + Hybrid MBR)
2023/09/23 17:09:01 Using sudo to gain permission to format /dev/disk/by-id/wwn-0x5002538043584d30
2023/09/23 17:09:01 If you prefer, cancel and use: sudo setfacl -m u:${USER}:rw /dev/disk/by-id/wwn-0x5002538043584d30
2023/09/23 17:09:01 open /home/sean/gokrazy/hello/config.json: no such file or directory
2023/09/23 17:09:01 exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant