For macOS builds, the answer to what "the simplest and space efficient & portable way to setup a CI machine at home" is clearly the Mac Mini.
What would be the answer for x86 Linux (NixOS) builds? Is there an equivalent hardware? I'd like to move away from Hetzner Dedicated to something hosted at home.
cc @Tim DeHerrera @Shivaraj B H
Note: 'portable' as in I can throw it all in an international-flight allowed luggage.
I have only experience of self-hosting a raspberry pi model 4 and an old ASUS fx503vd laptop of mine. I host DNS server, password manager, file syncing service and a reverse proxy on my pi. I use the Asus laptop to play around with GitHub runners.
I am looking for a portable Linux box as well, in the same form factor as the Mac mini
For portability, I tend to carry around the SSD, I got an SSD enclosure that supports upto 10gbps of transfer speeds if I want to carry only the data around. I am still yet to play around with encrypting the disk for security and hardware RAID for redundancy
Have you looked at intel's NUC boxes? Some of those have fairly decent compute and are basically the same size as a mac mini.
Interesting, I think I'll buy one of those NUCs.
66500FAF-187B-4E03-94B1-59F7EB30DB24.jpg
Great, I am getting one as well
Oh wait, let me see if I can even buy this in India :smile:
Okay, I can.
Which NUC will you be getting?
Intel NUC 13 pro is what I was thinking
This looks like barebones configuration without memory/SSD?
I'm looking at the same, but with memory/SSD installed: https://www.amazon.ca/Canyon-i5-1340P-Support-Thunderbolt-Windows/dp/B0CC2P1TVH/
Though it makes sense to get the barebones one and install whatever you need on top.
Yeah, I want to swap stuff based on need
NUCs are dead?
The popular Intel NUC Mini PCs were to be scrapped - an austerity measure that was necessary after Intel's mounting losses. The processor giant has now reached an agreement with Asus to continue manufacturing existing NUC models and to develop new mini PCs. https://www.notebookcheck.com/Intel-NUC-Mini-PCs-werden-kuenftig-von-Asus-entwickelt-und-vertrieben.735057.0.html
That's a German article, but I learned of it from this English one
Huh, well you can still buy them on Amazon for now at least :sweat_smile:
I wish the world switched to ARM, then I can just run a Linux VM on my arm Mac.
Well, it is really easy to setup an x86 NixOS box to emulate arm at least. I know that's the opposite of what you want though :sweat_smile:
I am thinking that the NUC is a little too expensive for only the CPU, ports and the box. I might go scavenging in the local market nearby, see if I can find something cheap
Tim DeHerrera said:
Well, it is really easy to setup an x86 NixOS box to emulate arm at least. I know that's the opposite of what you want though :sweat_smile:
You know what I am thinking? Just get a Mac Studio and setup a x86 Linux VM on it providing Linux CI.
But if I'm going with that option, I should probably just wait for the M3 studio in second half of this year.
Shivaraj B H said:
I am thinking that the NUC is a little too expensive for only the CPU, ports and the box. I might go scavenging in the local market nearby, see if I can find something cheap
You will find cheaper alternative. I found some in Canada,
Yes, I was also considering getting all teh parts separately and assembling myself.
I am literally getting i5 13th gen 14 core CPU for half the price of what the NUC with 12 core variant costed.
Srid said:
Tim DeHerrera said:
Well, it is really easy to setup an x86 NixOS box to emulate arm at least. I know that's the opposite of what you want though :sweat_smile:
You know what I am thinking? Just get a Mac Studio and setup a x86 Linux VM on it providing Linux CI.
But if I'm going with that option, I should probably just wait for the M3 studio in second half of this year.
I'll try this in the meanwhile: repurpose my M1 Max (macbook pro) to run intel x86 VM providing CI for my github projects, in addition to having a native macOS runner (maybe in a VM too) providing macOS CI for the same projects. If nothing else, it would put a good use of my mostly unused 64GB of RAM and CPU cycles.
Actually I don't even need a separate VM for it. Just use the arm NixOS VM, and setup boot.binfmt.emulatedSystems
. Then I can build for intel using --option system
. Parallels allows the use of rosetta somehow.
The linux-builder in nix-darwin would streamline it even further,
https://nixcademy.com/2024/02/12/macos-linux-builder/
However, it:
What is the overhead of running parallels NixOS VM? Running a qemu NixOS VM consumes additional 600 MB RAM (on my M1 Pro Mac) to keep the VM running, didn’t check the CPU usage though
~850 MB
(That's the total usage, not just overhead, as NixOS boots up)
yeah the binfmt.emulatedSystems is what I was referring to. As for VM overhead I am currently using https://astro.github.io/microvm.nix/.
The cloud-hypervisor instance I'm running seems to reserve all the memory I allocated for the machine up front, but I believe there are ways to configure it so that it doesn't do that. According to this post though, the memory overhead should be miniscule:
https://github.com/cloud-hypervisor/cloud-hypervisor/issues/1729#issuecomment-1158573430
A message was moved from this topic to #nixos > Darwin's linux-builder by Srid.
for portable home CI (linux), I am planning to assemble myself. I will be using mini-itx motherboard for mac-mini like form factor.
This guy on youtube has some pretty cool builds: https://www.youtube.com/watch?v=WN6DUjML8Eo
Take pictures along the way for a great blog post.
Shivaraj B H said:
This guy on youtube has some pretty cool builds: https://www.youtube.com/watch?v=WN6DUjML8Eo
That looks very portable indeed!
1243781E-3B6F-4E7F-9B9E-ED75CF220836.jpg
Got my mac mini to self-host CI and other misc. stuff. Next up, linux build that I spoke of earlier. That might take a while though, temporarily I will use another rog strix laptop I got with i9 13th gen and 3070ti.
Only problem is power consumption, I will try to hack my way through to have something like WOL for mac mini and also on the rog strix for now.
Only problem is power consumption
I power expensive where you live? In any case it is hard to beat the Mac Mini when you put in a dedicated GPU I guess...
It’s not expensive, but I like to be efficient :laughing:
Last updated: Nov 15 2024 at 12:33 UTC