Holochain Forum

What is the *worst* of holonix onboarding? 2019-Q3

in an effort to cultivate “beginner’s mind” i’d like to hear where people are getting stuck with holonix, holchain, or nixos in general

it’s so easy for one “tiny” detail to derail the whole process and there’s no way anybody would know unless we talk about it and dive deep into the painful bits :slight_smile:

i’m assuming that docs are getting in the way as there are almost zero docs - I'm spinning up some docs for holonix, feedback welcome :)

1 Like

A real succinct overview of Nix basics would be really good, it’s still somewhat of a mystery how it works and what steps to take when troubleshooting.

If there’s a way that repositories can be setup such that contributors don’t have to think about Nix (including with the addition of custom repo-specific commands), it would be great to have instructions as to how to achieve that. Currently (probably due to legacy) my team is expected to reason about whether they’re in “normal mode” or “nix mode” and that creates room for avoidable errors.

Also would be great to have better docs on how to run one-off Nix commands (I am running things like nix-shell holonix-0.0.29 --run hn-flush which seems messy, but don’t know if that’s idiomatic); how to determine the available Nix commands, and how to setup an unattended upgrade script i.e. install a Nix shell package without also booting it up interactively.

Also I’ve been missing instructions on how to setup a project’s dependencies to a particular version of Holochain, everything so far (eg. https://holochain.love) has been “quick start” oriented rather than “serious workflow” oriented.

1 Like

What sort of branches do devs’ minds have to traverse into for normal vs nix mode?

It’s getting cleaner now, but some lingering context switching remains, see here.

So for performance reasons, devs need to know to enter nix-shell before doing anything else. There might even need to be duplicated script configurations for development use vs CI.

The other issue with Nix is encountering Bad owner or permissions on $HOME/.ssh/config when attempting to run any commands that interact with SSH (i.e. git). Unsure if there is a way to fix this (if so, docs would be great @thedavidmeister); but that’s the other context switch contributors still need to be aware of.

@pospi the permissions issue sounds like a bug to me, i haven’t seen that or heard of it before

could you put something up on the holonix repo?

Ok turns out this was a me thing, I had that file set to 0664 instead of 0644. Weird that nothing else has ever complained about it, though. Might be one to add in the list of gotchas.

1 Like

@pospi i’m 100% guessing here, but perhaps a different version of whatever was interacting with the ssh config is being used inside vs. outside and the one inside works slightly differently :man_shrugging:

Git differs by a patch version, so… maybe. ssh doesn’t seem to have a CLI switch to print out the version :woman_shrugging:

I opened a ticket about holonix: https://github.com/holochain/holonix/issues/56

I’ve still been using just the nix-shell and pointing to the specific tarball I need. I got some errors before trying to convert to using a Nix configuration file, but need to revisit that now that I’m able to compile and run again on the latest release. I will say I’ve been pleasantly surprised how easy NixOS and by extension nix-shell are to use in the fail-fix-retry cycle. I’m still waiting on my new development machine to arrive, but to practice with Nix I set up NixOS on an old netbook and even though I had to struggle to get some things working, it was still much easier to just change the configuration file and retry and know that I have an install and configuration process that is totally repeatable. I’m excited to just switch to NixOS as my distro going forward.

2 Likes

Great that you have got a working setup. Not sure what your usecase is but you don’t actually need NixOS for development. You can just use nix-shell on linux or mac (which you might already be doing).

nixos is pretty sweet though :slight_smile:

there are things you can do with an OS that you can’t do with the shell alone