NixOS for university

Hi peeps,

Bachelor in CS 1st year, and would like to know if it would be a good idea to install NixOS on my main laptop for this academic endeavor.

If anyone did and what were the pros and cons of doing so.

My main reasons to do so are basically because I want to get rid of windows the fastest I can and start using mainly linux asap. My main problem with other distros is the lack of versions feature which could break my system and well, that wouldn’t be so cool, at least on NixOS I can roll back.

I did install it on my second laptop to test out how it compares to other linux distros I’ve used in the past, I was already familiar with flakes and other things, but not home manager for example I’m not even sure what it is. Also, I only used command line in all my linux experience. I did use fedora and debian before and I mainly used it for servers.

Also, do you guys have any shortcuts to change your configs or smth ? Having to go there all the time is pretty time consuming.

Hi, i have it on my desktop and on my surface pro, but im in mechanical engineering. My biggest problem was CAD software, but i switched to a cloud based version anyway. So it works well for me and my needs, but cant say for CS people.

home manager does a few things, one of them is that it replaces the config files with symlinks. so that you can store them anywhere you like. Most have .dotfiles folder with all the config files. that makes it easy to access them all. it also works with generations, so you can rollback your home manager configs. there are different ways of installing Home manger, and they offer different pros and cons. best to read up on it or watch a video. Probably a few more things that home manager does and can, but that is what i use it for. Not sure if that helps.

1 Like

I use NixOS desktop, with a classic config, as my daily driver (architect/sysadmin who design and implement complete infra essentially), back to the uni, I was on GNU/Linux since the high school, at first year I was on FreeBSD, than GNU/Linux, than OpenSolaris (now IllumOS).

If CS student is on Windows well… I call it someone who is in the wrong course, because you can’t live well on such OS. The sole issue I have back than was for the electronic course who demand a crappy circuit simulator written by the professor itself a decade or more before in some unknown Pascal dialect running only on WinAPI. For the rest and just for the thesis on a comfy TeXLive it’s a must.

The declarative approach (NixOS/Guix System) is clearly the recent past, present and future of IT, since it’s the IaC paradigm built-in in the OS without the immense overhead and attack surface of modern containers, a fashion pushed for commercial reasons like full-stack virtualization before, that will be deprecated as well in some years. So well… I do HATE nix language, as I hate Haskell, but the paradigm and the desktop is a full yes: you do not waste time in keeping up your desktop, you learn, and being in comfort.

Nowadays most eventually demanded software are webapps, so you should not experience any issue.

1 Like

You should be fine with Linux in general for CS courses from most universities, a good portion of professors and TAs will be at least as nerdy, and certainly some of the IT staff. Hell, a good percentage of universities probably have been involved since the UNIX days, they won’t be too locked into Windows for CS courses of all things.

NixOS is indeed a level of quirky above that, but with nix-ld very little should in practice be a problem.

1 Like

I used guix and nix all through university, and while there were a few rough edges it was mostly fine.

The only actual problem I ever encountered was with the C# package ecosystem, specifically some of UCPHs custom made nuget packages for “turtle” drawing (which required getting my hands very dirty to fix) and waiting ages for sagemath to be built with cudaSupport. Stuff like that can be annoying when you just wanna get an assignment done, and the people designing those assignments aren’t making sure they work well on obscure reproducible distros, so expect that friction.

On the other hand, the whole reproducible science thing does have a point, adding Nix and git scaffolding around assignments meant that when I finally got something working, that state wouldn’t be lost later if I made some adjustments. This has saved me at least once from well meaning TAs marking assignments failed because they used an outdated GCC on their machine, having a working state preserved means you have lasting proof that your answer works as handed in, even if they don’t use the scaffolding you include.

Also, you will never experience a joy quite like a room full of Arch using CS students observing your update going wrong, and then rolling back in front of them to a working state.

So it’s some friction, but you trade it for some very nice benefits, and specially for CS, the friction should hopefully not be that bad.

3 Likes

Very important caveats:

  • You basically guarantee yourself to not get any official support
  • You may spend longer debugging why your environment doesn’t work than actually doing the assignment, if you are new to nix
  • You may fail assignments if your code doesn’t run under the “official” environment, even if it runs on your machine
  • You may encounter situations of Windows-only software that you must use for an assignment (should be rarer in CS, but still)

Personally I would still keep Windows around as a fallback (and in fact I do, on my personal machine that runs NixOS, because while not CS-related, there are still some software that are Windows-only). Keeping the officially recommended environment around (and familiarising yourself with it) would be a good idea as well (not just for assignments, but there’s definitely software that runs differently on NixOS vs other distros, mostly due to packaging bugs).

And in any case, back your code up :slight_smile: The way I’ve settled on is using private github repositories that I push to, but use what works for you.

4 Likes

Thank you! I will checkout home manager for sure then!

1 Like

Thank you all for your very useful insights, thanks tlader for nix-ld, and thank you to cafkafk and waffle8946 for their personal experiences, I will mostly likely then use NixOS for the time being in a sperate hard drive, and it’s going to be where I’m going to spend most of my time, eventually as I’ve looked into this there are ways to run windows easily from nixOS with GitHub - MatthewCroughan/NixThePlanet: Run macOS, Windows and more via a single Nix command, or simple nixosModules
Or
GitHub - j-brn/nixos-vfio: NixOS modules to automate vfio setups

But these things will come later as I’m not very experienced with nix. Mbe I’ll make a network in zerotier and have free vms connected to my pc at all times, so I can share files easily, vms like the ones offered by oracle cloud or google cloud running “official” supported distros.

And xre, no I can’t live on windows any longer, it’s y I’m here.

Appreciate you all,

You can use nix in WSL (Windows subsystem for Linux). This allows you to run Windows but also use Linux/Nix at the same time. This would allow you to do a gradual migration away from Windows and not have to set up a complete Linux system to cover every thing.