Disclamer: You probably shouldn't blindly copy these dotfiles, I doubt I'm doing things correctly. The whole system feels like a hack, but it somehow works. It's also made for me. I know what I want, I don't know what you want.
- Get the latest minimal NixOS ISO. I get it from here. You may want a slightly more stable ISO.
- Boot into the installer, setup, and mount the disks
- Depending on which host you want to set up, you'll have to follow different instructions, each in
./hosts/<host>/readme.md
- Depending on which host you want to set up, you'll have to follow different instructions, each in
- Get a nix shell with
git
andnix flake
set up:nix-shell -p git nixFlakes
- Clone these dotfiles to
/etc/nixos
:git clone https://github.com/mcotocel/nixdots /mnt/etc/nixos
- At this point, it would be smart to edit the
hardware.nix
file to suit your hardware, and additionally add or remove things you need or don't need
- At this point, it would be smart to edit the
- Install NixOS using the flake:
nixos-install --root /mnt --flake /mnt/etc/nixos#host --impure
- Host is the host you want to install. A list of hosts is in
./hosts
- Host is the host you want to install. A list of hosts is in
- Reboot and change the user password. Unless you want to use root the whole time, which is stupid
- Log in as the normal user and run
cp -R /etc/nixos ~/nixdots
to pull the config to your home folder
- Declarative packages and configuration management
- Lots of packages
- Rollbacks of configurations (When you mess something up, like the kernel)
- Cool story, some time back my disk wouldn't mount because I forgot to update the Intel microcode, and the rollbacks saved my ass
- Reliablity
- Reproducible environments
This isn't a fancy configuration intended to be easily modified by other people. I've got some hardcoded user paths that you need to change if you want to change the username, some configurations that make sense for me. You'll probably need to modify this manually to suite your needs, but it works for me.