| 22 Aug 2024 |
K900 | Quite literally doing ANY operation with Nix requires ~2GB of RAM | 09:39:48 |
theelevated | aint it just some c++ code like stated on the github? https://github.com/NixOS/nix | 09:40:20 |
ElvishJerricco | is C++ somehow incapable of using significant amounts of memory? | 09:40:35 |
theelevated | how can that clog up 2gb+ ?? | 09:40:37 |
K900 | By evaluating a giant monorepo of package definitions | 09:40:56 |
ElvishJerricco | programming languages don't determine how much memory is going to be used | 09:40:56 |
K900 | Written in a bespoke language that the "some c++ code" is an implementation of | 09:41:09 |
K900 | With a lot of lazy evaluation and mutual recursion | 09:41:22 |
K900 | And a not great GC | 09:41:26 |
ElvishJerricco | I was going to say that the only reasonable way to use nix for these things would be to build bootable images for them on another machine, but even then you won't be building nixos images. 256M is a stretch for a nixos image, and 64M just almost certainly won't work | 09:42:59 |
ElvishJerricco | you want an actual embedded OS, and nixos itself just isn't suited for that | 09:43:33 |
K900 | Yeah, systemd alone will eat up 64MB | 09:43:56 |
ElvishJerricco | I mean, there's "not-os", which uses nix to build an embedded os image | 09:43:57 |
K900 | And no, you don't get to not have systemd | 09:44:07 |
ElvishJerricco | there's also NixWRT for building embedded router images with nix | 09:44:09 |
ElvishJerricco | so building non-nixos embedded OSes is possible, but it's not common and you won't find a lot out there for it | 09:44:30 |
ElvishJerricco | * so building non-nixos embedded OSes with nix is possible, but it's not common and you won't find a lot out there for it | 09:44:35 |
theelevated | the plan now would be to build the nix package manager (cross-compiled from a beefier pc) to the duo and then patch the image. the init should be ok. maybe some kernel mods if I am bored | 09:47:53 |
ElvishJerricco | that doesn't make sense | 09:48:13 |
theelevated | but the package manager itself would not run? even on disabled use flags | 09:48:20 |
K900 | It will not | 09:48:27 |
theelevated | In reply to @elvishjerricco:matrix.org that doesn't make sense which part | 09:48:28 |
K900 | You need 2GB of RAM | 09:48:31 |
K900 | As I said like five times already | 09:48:37 |
ElvishJerricco | I'm not sure what you mean by "patch the image" and "the init should be ok" | 09:48:47 |
K900 | Also, there are no use flags | 09:48:47 |
ElvishJerricco | and also what k900 said | 09:48:56 |
K900 | I think they want to just slap Nix on top of the vendor image | 09:48:58 |
theelevated | In reply to @k900:0upti.me OS ? (and the above mesage) | 09:49:16 |
K900 | Which theoretically would work except the part where you need 2GB of RAM to actually do anything | 09:49:19 |