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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with Nix development environments #7

Open
jmgilman opened this issue Apr 3, 2023 · 2 comments
Open

Integration with Nix development environments #7

jmgilman opened this issue Apr 3, 2023 · 2 comments

Comments

@jmgilman
Copy link

jmgilman commented Apr 3, 2023

馃殌 Feature

Nix has primarily remained a third-class citizen of most of these types of systems (like the authors, I've tried many times to make Gitpod work with little success). I've always thought these systems were a prime candidate for integration with Nix's development shells. We've already done some work with getting VSCode to support remote development with native Nix containers. Using firecracker seems more promising as we can likely get a more native experience and avoid some of the limitations we ran into with containers.

Unfortunately, I wasn't able to discern enough from the documentation for me to understand if this is something that can currently be supported with Hocus. Are we able to control Hocus at the base image level? Could we hack into the pipeline to build and deploy custom Nix images with development shells pre-populated?

I'd be happy to work on this piece of the integration if it seems plausible.

@gorbak25
Copy link
Member

gorbak25 commented Apr 6, 2023

@jmgilman
Hocus builds a new VM for your project based on what you specify in hocus.yml. For Hocus in Hocus developement we use this VM image. All VM's are built using plain dockerfiles. I see no problem with creating a nix base image as long as some assumptions Hocus makes are fullfilled(a custom dtach binary, tmux is available etc...). Here is the base workspace image we currently use and you may infer from it what needs to be in the workspace image for Hocus to work.

Also you may specify a custom shell in your workspace tasks(if you want we may also add this feature for prebuild tasks) where you could launch nix shells for your developers :)

Also you may customize the internal VM images the agent uses for prebuilds and various tasks. Here are the Dockerfiles for those VM's.

So I see no problem in just using nix in the workspace image, I don't see whether Hocus needs to know about nix at all as we operate on VM's, as long as the assumptions we made about the VM images are fulfilled Hocus should work fine with Nix.

Perhaps I misunderstood this feature request? Could you please describe in detail what are you expecting from a Nix integration?

@gorbak25
Copy link
Member

gorbak25 commented May 9, 2023

@jmgilman We're thinking of introducing per team/project buildkit builders. Instead of using docker we would use buildkit directly. Buildkit has support for mutiple frontends, especially for nix. Would the ability to directly specify the buildkit frontend in hocus.yml work for you?

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

2 participants