How do I apply a GitHub commit to my configuration.nix?

Well I could always work on my exposition skills, don’t just blame yourself, obviously I’m making things too complicated :laughing:

For now you could probably jus copy this snippet and it would work:

{config, ...}: {
  disabledModules = ["services/desktops/pipewire/pipewire.nix"];
  imports = let
    pr176561 =
      fetchTarball
      "https://github.com/nixos/nixpkgs/archive/955d1a6dde9862822fbb0f2d6be9bfa51fdbc689.tar.gz";
  in ["${pr176561}/nixos/modules/services/desktops/pipewire/pipewire.nix"];
}

All I’m doing is definig the custom nixpkgs in a let block right where it is consumed instead of bothering with modifying the nixpkgs fixed point with an override. There is also no need to import it since all we need is one file from the source tree. I’ll leave pulling just a single file with the GitHub raw api as an optional excercise for you.

2 Likes