Help me get started - Best practice, nvim, learning the language

There’s a basic tutorial here: https://nix.dev/tutorials/first-steps/nix-language

nix.dev generally has some good guides nowadays.

Beyond that, figure out how packaging packages work, how writing modules works, and make use of the nix repl to try things out

Functional languages definitely feel different, if you’ve used python before, think list comprehensions and generators in general.

I’ve worked with engineers much more senior than me who hated them because they felt they were “thinking backwards”. But if you come to them with an open mind I think you might find them fun. Nix is only rarely used for hardcore programming anyway, so you may never have to really learn programming in these languages.

I have to admit, I’ve not used vim on NixOS. There is programs.neovim.enable and its sister options, which you can use to do most configuration.

Lot of language servers are also just packaged for nix, and you only need to install them.

Maybe home-manager’s options are better/more idiomatic though: https://nix-community.github.io/home-manager/options.html#opt-programs.neovim.enable

Depends. Generally, yes, splitting files into conceptual units is good software engineering practice, but you don’t want dozens of three-line files.

Vi/WM definitely sound complex enough to be nice “units”.

For hard drives/luks I’d recommend disko by the way.

If you want the full reproducible OS experience, this is indeed necessary. If you use home-manager this can be done relatively transparently, often just need to set up a home.file.

It’s not mandatory to use NixOS, however, and trying to do so can be time consuming. It’s a good way to learn nix though!

2 Likes