News for hackers. Stuff that matters.
Re:Introduction to Immutable Linux Systems by rebeccaskinner on Monday September 18, 2023 @12:54AM (#37552380)
NixOS gives you precisely this kind of control- through a few different mechanisms. Some packages in nixpkgs, and most NixOS and home manager modules, expose a lot of configuration options where you can configure various plugins, add extra packages, etc. Nix also lets you provide overlays and overrides to add custom packages (new packages, or customized versions of existing packages) and gives you the option of changing parts of a package. If none of that is sufficient, you can even supply your own patches to the code, or build the package from your own fork of the upstream repository.

In practice this is one of my favorite things about nix. I find that I contribute much more to open source in general because it’s so easy to say “replace this dependency with my version when you build this package”.

Re:Introduction to Immutable Linux Systems by anotherhue on Monday September 18, 2023 @04:40AM (#37553723)
Would you have any examples of this to hand? I've been trying to find a clean way to share an altered qemu derivation that isn't just me copying and maintaining the qemu/default.nix but so far that has been the easiest.
Re:Introduction to Immutable Linux Systems by chpatrick on Monday September 18, 2023 @07:49AM (#37554945)
override/overrideAttrs/overlays
Re:Introduction to Immutable Linux Systems by rebeccaskinner on Monday September 18, 2023 @11:47AM (#37557846)
This post is a bit old now, and might not be entirely what you were looking for, but I wrote about getting my personal blog building with nix, including an example of using an overlay and patching and upstream dependency:

https://rebeccaskinner.net/posts/2021-06-06-nixifying-a-haky...