Readit News logoReadit News
mkenigs commented on Show HN: Flox 1.0 – Open-source dev env as code with Nix   github.com/flox/flox... · Posted by u/ronef
pxc · a year ago
> Hey there! Looks like you may have missed the Nix/Generic and Nix/NixOS tabs at https://flox.dev/docs/install-flox/? Do those satisfy the side by side use case you’re talking about?

I totally did! Those are what I was looking for. (Although I'm glad I missed them in a way because I'm happy to have gotten to explore the behavior of the Flox installer when there's an existing Nix install already.) How embarrassing! Thanks :)

> I think the best way to use fish at the moment is `FLOX_SHELL=zsh flox activate -- fish`. That doesn’t support aliases but should mostly work

Thanks! I'll try that for sure.

> Are you hoping to actually hack on the source or just trying to understand how to come up with a workaround?

More the latter, especially because I don't totally know yet how interested I am in Flox. But I do love Fish and I did once work on some hairy issues in shell initialization for Fish in NixOS, so this kind of shell environment setup is the kind of thing that I've enjoyed plugging away at in the past, haha. At the same time I have virtually no Rust experience. That link is already pretty helpful, since I have a sense of where the shell code finally comes in, now.

But I am curious about how the thing works, and I miiiiiight try to mess around, so if the shell init stuff is something you've worked on and are proud of/excited to share about, I'd love to hear more about it!

mkenigs · a year ago
Yes I have worked on it and would love to help if you want to poke around! If you have more questions I can answer on our Slack https://go.flox.dev/slack. It's not completely straightforward how it all works
mkenigs commented on Show HN: Flox 1.0 – Open-source dev env as code with Nix   github.com/flox/flox... · Posted by u/ronef
pxc · a year ago
I tried Flox on macOS last night and noticed that it installed Nix in the default profile alongside the one Nix-Darwin manages in /run/current-system/sw/bin, and symlinked its copy into /usr/local/bin. I also noticed that there were no instructions for existing Nix users qua Nix users— nothing for NixOS users or users of other distros who might already have Nix installed but who lack a Flox-supported distro package format.

Is this because as a third-party profile manager for Nix, Flox depends on the unstable format of Nix profile manifests and whatever else, or is Flox actually usable (if not tested) alongside a wide range of Nix versions? Is Nix-based installation of Flox a feature you intend to eventually support?

Also, it's been mentioned that Fish support is coming. Can anyone point me to a bit of Flox source or config on where the shell integration for the `activate` subcommand actually lives? I'd like to rig something up with fenv or the like while awaiting official Fish support, but didn't see an obvious place to plug in when I glanced at my Flox install and the Flox source last night.

mkenigs · a year ago
Hey there! Looks like you may have missed the Nix/Generic and Nix/NixOS tabs at https://flox.dev/docs/install-flox/? Do those satisfy the side by side use case you’re talking about?

I think the best way to use fish at the moment is `FLOX_SHELL=zsh flox activate -- fish`. That doesn’t support aliases but should mostly work

Are you hoping to actually hack on the source or just trying to understand how to come up with a workaround? We error for any shell other than bash or zsh somewhere around https://github.com/flox/flox/blob/9e18a3ceaa185006bae95a4827... If you want to take a crack at hacking on it I’d be more than happy to give more background!

mkenigs commented on Show HN: Flox 1.0 – Open-source dev env as code with Nix   github.com/flox/flox... · Posted by u/ronef
ivanjermakov · a year ago
What is the benefit of using Flox over plain nix-shell or nix develop?
mkenigs · a year ago
Flox employee here! To start off by addressing how this relates to nix tools:

- Our goal is to be more user friendly. You don't have to learn the Nix expression language or understand nix internals to be successful.

- We've been able to add some opinionation and polish. Some of that is subjective, but some examples are:

  - We have a hybrid imperative/declarative interface. You can `flox install && flox list`, and those changes are reflected in TOML. Whereas with `nix develop` you have to edit a Nix expression

  - `nix develop` drops you into a bash shell, whereas `flox activate` can drop you into a bash or zsh shell (and we plan to add support for fish)
- We support using git to manage environments just like nix tools do, but we've also added the option to share flox environments in ways you can't with any of those tools (flox push/flox pull/flox activate -r) and the ability to view environments in ways we feel can be more user friendly. If you create an account, you can see packages I have in my environment at https://hub.flox.dev/mkenigs/default, or if you have the CLI, you could inspect my environment with `flox list -r mkenigs/default` before using it with `flox activate -r mkenigs/default`. I think that's much more digestible than linking a flake.nix to someone who doesn't know the Nix expression language

mkenigs commented on The Flox Open Beta   floxdev.com/blog/flox-ope... · Posted by u/flurie
stavros · 3 years ago
I tried, but I need to create an account, enter my name, a password, my email, wait for the email, click on the activation link, and then wait for a moderator to approve me. This feels like too much effort when I could go to GitHub and upload a file, so I don't think I'll manage it by the time a moderator gets around to approving me.
mkenigs · 3 years ago
We'll take that into consideration! If you prefer, you can open an issue under github.com/flox/flox
mkenigs commented on The Flox Open Beta   floxdev.com/blog/flox-ope... · Posted by u/flurie
stavros · 3 years ago
Some feedback, as I'm trying it out:

* I love that there's a .deb. Usually it's either a GH binary, or curlbash.

* I love the uninstallation instructions. Everyone else doesn't give a shit what they leave all over my filesystem.

* I can't really install it because I don't have Nix, and I don't really know how to get Nix on Ubuntu. I tried some packages once, but they didn't work. I'd appreciate some help here, as Flox is a non-starter if people can't install Nix. It doesn't even mention that I need Nix, the deb just fails to install. This is a pretty big omission.

EDIT: Turns out it fails because I already had Nix? The systemd unit needed to be removed. That's odd.

* I tried to follow the "first environment example", immediately got an error:

error: could not set permissions on '/nix/var/nix/gcroots/per-user' to 755: Operation not permitted

No guidance on how to proceed from here. That directory is already 755. Googling the error leads me to a GitHub issue with hundreds of comments, and no obvious solution other than somehow reinstalling, but I don't think I installed Nix in the first place?

That's the end of the line for me, sadly.

mkenigs · 3 years ago
Hi there! Sorry to hear you're having trouble :( Could you open a bug report at https://discourse.floxdev.com/c/bug-reports and upload /tmp/flox-installation.log?

u/mkenigs

KarmaCake day10October 13, 2022View Original