4 ms·
I fork the repo, update the package in my fork, add the fork as a flake to my inputs and test my changes. When I'm happy, I create a pull request to the main re
by pimeys 5y ago
I fork the repo, update the package in my fork, add the fork as a flake to my inputs and test my changes. When I'm happy, I create a pull request to the main repo.
I started using NixOS in all my machines last winter, and slowly decided it is for me when I understood the basics. It was a rough start for me, but I have a few decades of linux knowledge, that helped me past the starting point.
You can read my config and see how to create overlays from different sources. E.g. if your fork updates vim, your overlay overwrites vim in the definition. Then referring to pkgs.vim points to your fork. See flake.nix in the repo.
https://github.com/pimeys/nixos https://github.com/pimeys/nixos
- kaba0 5y agoI would just add that more often than not it is as easy as changing the version string in the somePackage/default.nix file and changing the corresponding hash of the source. Of course if the build changes in the new version or it depends on some new lib it can become a bit more difficult, but with a bit of experience it is not that hard to solve.
- pimeys 5y agoAnd to get the hash of some file you download, you can do `nix-prefetch-url https://us.download.nvidia.com/XFree86/Linux-x86_64/460.80/NVIDIA-Linux-x86_64-460.80.run https://us.download.nvidia.com/XFree86/Linux-x86_64/460.80/N...` that'll cache the file for you and give the sha256. Remember to add `--unpack` if the file is an archive.
- gdown 5y agoAs a side note, thank you for posting this. I've been trying to get flakes set up on my system and this is more readable than the other dotfiles I've looked through.
- pimeys 5y agoYou're welcome. It is still not perfect, and I hit my head to the wall enough when writing that. hlissner is my biggest influence here, but I simplified their code a lot so I can understand it better for now. My nix-fu is still not that high level. Next thing I want to learn is how to package a complex js/rust package into a flake setup. I have the whole next friday to that.