I’ve been trying nixos recently and after watching a bunch of tutorials from various people, I have managed to enable home-manager and flakes.
My question is: where should I write the packages I want to install? In home.nix? In flakes.nix? In configuration.nix (probably not)? I’m probably only gonna have a single user on this machine.
So far, I think the only difference between writing the packages in home.nix compared to flakes.nix is that in the 1st senario, the apps will only be available for the user, while in the 2nd, it will be available for the whole system. Also, I could use the home.nix for non-nixos systems too. Other than that, I can probably write them the same way either on home.nix or flakes.nix and have the same result on my machine.
PS. On search.nixos.org there is an option to search for flakes. What is this? I am planing to get my packages from the packages tab, but I’m wondering that maybe I should search in the flakes tab instead (though it doesn’t seem to have many packages).
PPS. Those are some resources I’ve found (I’ve mainly watched the videos and have started reading some of the guides):
- https://github.com/Evertras/simple-homemanager/blob/main/04-explain-outputs-function.md
- https://www.youtube.com/watch?v=a67Sv4Mbxmc
- https://www.youtube.com/watch?v=a67Sv4Mbxmc&list=PLko9chwSoP-15ZtZxu64k_CuTzXrFpxPE
- https://www.youtube.com/watch?v=63sSGuclBn0&list=PLuRxZ95-8LY1mlotZMYGYib5sXJRw1RxW
- https://www.youtube.com/watch?v=AGVXJ-TIv3Y
- https://www.youtube.com/watch?v=nLwbNhSxLd4
- https://discourse.nixos.org/t/pass-specialargs-to-the-home-manager-module/33068/4
- https://nix-community.github.io/home-manager/index.xhtml#ch-usage
- https://www.chrisportela.com/posts/home-manager-flake/
- https://nixos-and-flakes.thiscute.world/
- https://discourse.nixos.org/t/practical-nix-flakes-anatomy-a-guided-tour-of-flake-nix/42550/8
- https://old.reddit.com/r/NixOS/comments/v2xpjm/big_list_of_flakes_tutorials/
Oh thank you, that’s a lot of important info you gave me :)
You probably solved some/many of my problems, I’ll keep digging. Thanks again!