This is my personal NixOS configuration. As of now, I have only installed NixOS on my present laptop, Lenovo P14s, alongside Windows. At some point, I will probably also install NixOS on my home server and add the configurations here. A nice thing about NixOS is that it greatly facilitates managing multiple machines in a reproducible way.
The most important sources of inspiration have been
- jluttine's Nixos configuration
- hlissner's Dotfiles
I installed NixOS through USB. The installer doesn't do any disk partitioning or formatting, so one needs to do that by oneself, e.g. according to the official manual instructions.
After installing NixOS on a machine, symlink the file
./hosts/awesomename/configuration.nix
at /etc/nixos/configuration.nix
, and run
sudo nixos-rebuild switch
If all went well, boot to the system. Obviously the configuration could be
defined anywhere on the hard disk, as long it is symlinked to
etc/nixos/configuration.nix
. This is just how I have organized it.
I have tried to compose the configurations so that it is
- modular,
- reasonably simple, and that
- I can configure my work laptop with it.
While "developing" the configuration, at the same time I took a shot at
including all my dotfiles in it. I have used the Home
Manager which is a system for managing a Linux user environment (e.g.
Emacs/Vim configurations). All related configs are defined under ./home/
and
can be disabled completely from the configuration.
Currently I use an i3 based desktop environment that is included in the configuration as a module.
This Stian Lågstad's blogpost was a useful reference when configuring an encrypted partition for NixOS on a machine with an existing Windows installation.
TODO: Write an own version for reference.
- VirtualBox
- Color switching
- Installation instructions
- CUDA