this post was submitted on 17 Jul 2023
8 points (100.0% liked)

nixos

1247 readers
1 users here now

All about NixOS - https://nixos.org/

founded 4 years ago
 

I've been hopping around Gentoo and Void the past few days with musl on both, and I'll be going back to NixOS in a bit due to not having enough time to set up either of them. I've realised how little RAM either systems use on musl, though, and I was wondering if there is any chance of replacing glibc with musl on NixOS?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Nixpkgs includes packages compiled for musl under the pkgsMusl prefix. For example, pkgs.pkgsMusl.hello. IIUC these only exist on a Linux system.

Maybe you can use those packages for everything by setting pkgsMusl as your package set. For example if you are using Home Manager with a flake config you normally have a line like,

let pkgs = nixpkgs.legacyPackages.${system};

Maybe you could change that to

let pkgs = nixpkgs.legacyPackages.${system}.pkgsMusl;