tl;dr: I followed the installation instructions, installed, and now the config file I wrote no longer exists. Where is it/what did I do wrong?
I have a VPS on liteserver, I loaded minimal NixOS iso, and then followed the NixOS manual installation guide. The system is legacy so I followed the ’ Legacy Boot (MBR)’ partitioning section – I just ran the commands exactly as printed in the manual, except that I substituted sda
, sda1
etc. for vda
, vda1
etc, because I’m on a VPS. Similarly for formatting: I ran mkfs.ext4 -L nixos /dev/vda1
then mkswap -L swap /dev/vda2
. Then I ran mount /dev/disk/by-label/nixos /mnt
and swapon /dev/vda2
.
I created a config file with nixos-generate-config --root /mnt
, edited it, and then ran the installation. After installation and reboot:
- the file at
/etc/nixos/configuration.nix
is not the config file I wrote. It is the same as the file which was there during the installation, the contents are:{ config, pkgs, ... }; { imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix> ]; }
- the file which I edited during the installation process does not exist either. It was at
/mnt/etc/nixos/configuration.nix
(as described in the manual)./mnt/
is now empty (the directory exists, but there’s nothing in it).
What happened to the configuration file I wrote? I’m happy to go through the installation process again—should I have copied/moved it?
TIA!