If that post doesn’t work for you (and I suspect it won’t, but you should try it in case I’m wrong—the issue you’re currently encountering with it is an accented ì
character where it is complaining—replace that with an English i
), here’s another concept. This is more involved than your typical override because it’s a kernel module, but you should be able to do something like this:
boot.kernelPackages =
let
# or however you want to get a Nixpkgs from when 7.0.22 was the Virtualbox version
oldPkgs =
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/882842d2a908700540d206baa79efb922ac1c33d.tar.gz";
};
in
# change linuxPackages to a different kernel package set if desired
pkgs.linuxPackages.extend (final: prev: {
virtualboxGuestAdditions = final.callPackage
"${oldPkgs}/pkgs/applications/virtualization/virtualbox/guest-additions"
{ };
});