-
Notifications
You must be signed in to change notification settings - Fork 626
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
nix: vms for testing ghostty #4608
Conversation
Works on my NixOS desktop (of course) On mac I get:
|
I was looking at build-and-run-vms to see if turning on the linux builder helps. I still get:
|
After reading a couple blog posts, I just pushed a patch that maybe fixes this (at least until we find the next roadblock) as this command to manually build is working on my Linux system with aarch64 cross-compilation turned on. Not sure if it finishes yet because cross-compilation is very slow.
|
d9d9afd
to
8fcf3c1
Compare
output of latest commit on M1 macbook pro > nix run .#wayland-gnome
error: a 'aarch64-linux' with features {} is required to build '/nix/store/pbpm1nf1lfwk2kp1qchn90i16fz9hgb0-NetworkManager.conf.drv', but I am a 'aarch64-darwin' with features {apple-virt, benchmark, big-parallel, ca-derivations, nixos-test} Edit: with |
Aha, I was just about to ask about that. The CI runs would probably not be run on macOS as they are slower (and more expensive) than Linux CI runs. Not even sure yet if these will even be run automatically for Linux. |
Nice! I did find this blog post that has some tips on giving the builder some more resources, that might help. |
The above works for me also and I get a VM image to run. It took quite a while to build on my M1 but that's ok I guess. |
Yeah, it's not exactly a speed demon on Linux either. |
Maybe the plan can to be:
|
Yeah, basically I wanted VMs like this so I can easily run Ghostty in environments that are dissimilar from mine to test how |
8fcf3c1
to
275f396
Compare
fdb0d0a
to
f0bdb3f
Compare
If I'm testing a vm with a few more customized options can I just define the vm snippet and pass it to |
I just added a couple of patches that should let you do this (untested):
|
Also, let me know if there are things that should be in the base image. I can see a case for |
Home-manager probably isn't a candidate either, even though it's very popular I don't think that it's necessary for testing Ghostty. |
Tension between maintenance and use 😄. I'm coming at using nix vm's with a different time frame in mind. Instead of a blessed (read maintained) set of vms that are correct for months/years, I'm interested in tool to collaborate over briefly and than mostly throw away.
|
e378f8e
to
e283ef9
Compare
e283ef9
to
423133b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think plenty of logic could be extracted into separate nix/vm/*.nix
helper files (i.e. runVM
) and I think we could organize it slightly differently but overall this is very good work and I'm happy to merge it.
I'm not sure if you're aware of a way to at least update the CI to validate all the configs are valid. Running them would be too expensive, but validating they build would be excellent if we could.
Adds a Nix VM configuration to run Gnome/Wayland. The primary purpose will be testing Ghostty in a "clean" environment. I'm going to continue to experiment with running this in CI to see if we can do some basic testing of GTK since it's difficult to unit test that code.
To use, run
nix run .#wayland-gnome
in the Ghostty source directory. I have no idea if this works on macOS. There's probably a lot of extra stuff that can be trimmed to slim it down.Whatever directory you run this from will be mounted at
/tmp/shared
in the VM. Theghostty
user runs as uid/gid 1000/1000 so that may affect your ability to read/write that directory if your host system user runs as a different uid/gid.If this is something that we'd like to keep, we should add VM definitions for KDE Plasma and maybe one tiling window manager.
Screencast.From.2025-01-04.22-19-31.mp4