!coeAONBrWyDJnYMbMi:nixos.org

NixOS System Operations

592 Members
About system administration for running NixOS systems in production. Declaratively manage your operations. | Room recommendations: #networking:nixos.org163 Servers

Load older messages


SenderMessageTime
22 Aug 2024
@theelevated:matrix.orgtheelevated
In reply to @elvishjerricco:matrix.org
you're not going to get nix to work as a package manager at all on 256M of ram
i have the 64 mb version :>
09:38:21
@elvishjerricco:matrix.orgElvishJerriccoand even if you avoid eval'ing with copying NAR closures around, even importing NARs is pretty memory-intensive with Nix (though this has gotten better than it used to be)09:38:42
@elvishjerricco:matrix.orgElvishJerricco * and even if you avoid eval'ing withbycopying NAR closures around, even importing NARs is pretty memory-intensive with Nix (though this has gotten better than it used to be)09:38:48
@elvishjerricco:matrix.orgElvishJerricco * and even if you avoid eval'ing by copying NAR closures around, even importing NARs is pretty memory-intensive with Nix (though this has gotten better than it used to be)09:38:52
@theelevated:matrix.orgtheelevated
In reply to @k900:0upti.me
OS
if we only patch the image and load the nix package manager
09:39:10
@theelevated:matrix.orgtheelevatedcould work??09:39:14
@elvishjerricco:matrix.orgElvishJerriccoagain, there is no way to use it as a package manager on so little ram09:39:30
@k900:0upti.meK900 ⚡️Quite literally doing ANY operation with Nix requires ~2GB of RAM09:39:48
@theelevated:matrix.orgtheelevatedaint it just some c++ code like stated on the github? https://github.com/NixOS/nix09:40:20
@elvishjerricco:matrix.orgElvishJerriccois C++ somehow incapable of using significant amounts of memory?09:40:35
@theelevated:matrix.orgtheelevatedhow can that clog up 2gb+ ??09:40:37
@k900:0upti.meK900 ⚡️By evaluating a giant monorepo of package definitions09:40:56
@elvishjerricco:matrix.orgElvishJerriccoprogramming languages don't determine how much memory is going to be used09:40:56
@k900:0upti.meK900 ⚡️Written in a bespoke language that the "some c++ code" is an implementation of09:41:09
@k900:0upti.meK900 ⚡️With a lot of lazy evaluation and mutual recursion09:41:22
@k900:0upti.meK900 ⚡️And a not great GC09:41:26
@elvishjerricco:matrix.orgElvishJerriccoI 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 work09:42:59
@elvishjerricco:matrix.orgElvishJerriccoyou want an actual embedded OS, and nixos itself just isn't suited for that09:43:33
@k900:0upti.meK900 ⚡️Yeah, systemd alone will eat up 64MB09:43:56
@elvishjerricco:matrix.orgElvishJerriccoI mean, there's "not-os", which uses nix to build an embedded os image09:43:57
@k900:0upti.meK900 ⚡️And no, you don't get to not have systemd09:44:07
@elvishjerricco:matrix.orgElvishJerriccothere's also NixWRT for building embedded router images with nix09:44:09
@elvishjerricco:matrix.orgElvishJerricco 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:matrix.orgElvishJerricco * 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:matrix.orgtheelevatedthe 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 bored09:47:53
@elvishjerricco:matrix.orgElvishJerriccothat doesn't make sense09:48:13
@theelevated:matrix.orgtheelevatedbut the package manager itself would not run? even on disabled use flags09:48:20
@k900:0upti.meK900 ⚡️It will not09:48:27
@theelevated:matrix.orgtheelevated
In reply to @elvishjerricco:matrix.org
that doesn't make sense
which part
09:48:28
@k900:0upti.meK900 ⚡️You need 2GB of RAM09:48:31

Show newer messages


Back to Room ListRoom Version: 10