11 Jul 2025 |
prince213 | Interesting | 14:43:45 |
prince213 | * Interesting, I'll try | 14:43:51 |
Zhaofeng Li | very weird indeed, I assume you've looked at console.app too (filter by nix-daemon)? | 14:44:54 |
Zhaofeng Li | but for remote building, lix 2.93 does this weird bash thing to work around non-POSIX shells... which really wasn't a good idea | 14:45:42 |
prince213 | If you mean console messages then there doesn't seem to be any | 14:45:46 |
Zhaofeng Li | but it's been removed in head | 14:45:50 |
prince213 | The remote shell is bash IIRC | 14:45:59 |
prince213 | * The remote login shell is bash IIRC | 14:46:07 |
prince213 | So I just switched to Lix | 15:02:09 |
prince213 | And now it says error: Nix daemon disconnected unexpectedly (maybe it crashed?) | 15:02:15 |
prince213 | Okay I think I know why | 15:06:57 |
prince213 | And Lix did help by showing a better SSH error message | 15:07:35 |
prince213 | I have the keys in my home directory (for testing) | 15:08:16 |
prince213 | And macOS Sandbox will kill ssh because it tries to access my home directory | 15:08:42 |
cpick | Does anyone have a go-to one-liner or simple way to run a NixOS VM on darwin? I'm imagining something like (but, you know, functional):
$ nix run nixpkgs#nixos.config.system.build.vm
| 18:34:08 |
Zhaofeng Li | it should actually kind of work, with --system aarch64-linux , etc (basically what https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/profiles/nix-builder-vm.nix) does | 18:36:32 |
cpick | I figure there has to be a way to do it, but haven't figured out the exact incantation yet (I think, specifically, I need to find a nixos configuration to call .config.system.build.vm on)? | 18:38:52 |
Zhaofeng Li | the entrypoint is here https://github.com/NixOS/nixpkgs/blob/9807714d6944a957c2e036f84b0ff8caf9930bc0/pkgs/top-level/darwin-packages.nix#L182-L208 | 18:39:26 |
Zhaofeng Li | virtualization.host gives it the darwin pkgs for qemu and stuff | 18:40:00 |
Zhaofeng Li | I think the easiest way is to just override it, depending on how bespoke you want your setup to be | 18:40:46 |
cpick | nix run nixpkgs#darwin.linux-builder is pretty good (it does its hokey SSH-key setup, but that's not too bad). Thanks! | 18:42:35 |
Zhaofeng Li | yeah, if you just want a builder it works okay-ish | 18:44:52 |
cpick | I'm a bit partial to this one ;) | 18:45:25 |
cpick | (I actually had been ssh ing into my rosetta builder VM for all my Linux VM needs, but I wanted a easier way to blow away the image after doing one-off experiments and darwin.linux-builder should do nicely.) | 18:46:24 |
JoelMcCracken | so would these be, like, actual nixos vms? | 20:00:22 |
JoelMcCracken | I was trying to find a docker container that ran nixos at one point and it was very hard | 20:01:41 |
antifuchs | Yup, they’re aarch64-linux on an apple silicon Mac | 20:31:31 |
antifuchs | (The Rosetta builder is an x86-64) | 20:31:44 |
12 Jul 2025 |
Ihar Hrachyshka | you can also try to experiment with nixos-generators if you are interested in building images for alternative hypervisors like virtualbox or vmware... I just started looking into this, but basically a build gives you a .ovf file that you can import wherever and run. (e.g. as experiment I'm taking images to my NAS with crappy OS but that has virtualbox and run there.) | 01:03:38 |
commiterate | Redacted or Malformed Event | 05:31:20 |