I’ve installed nixos for the first time, following the installation guide, but I’m having problems installing packages after logging in with my new user for the first time.
As soon as I login, I see this: “No directory, logging in with HOME=/”.
If I try to run
nix-env -qaP \* I get: “error: getting information about ‘//.nix-defexpr’: No such file or directory”. What I expect to see instead is a list of packages.
From what I can see, my user does not have a home directory. There’s nothing in
Did I miss anything while installing? Any pointers would be greatly appreciated.
I’ve installed nixos version 19.09.2395.02f2241354a in a virtualbox machine. These are the steps I went through to install:
1. Sudo: `sudo -i` 1. `lsblk` 1. `parted /dev/sda -- mklabel msdos` 1. `parted /dev/sda -- mkpart primary 1MiB -10GiB` 1. `parted /dev/sda -- mkpart primary linux-swap -10GiB 100%` 1. `mkfs.ext4 -L nixos /dev/sda1` 1. `mkswap -L swap /dev/sda2` 1. `mount /dev/sda1 /mnt` 1. `swapon /dev/sda2` 1. `nixos-generate-config --root /mnt` 1. `vi /mnt/etc/nixos/configuration.nix` a. Uncomment the line `boot.loader.grub.device = "/dev/sda";` b. Write and quit 1. `nixos-install` 1. Enter new root password 1. `reboot` 1. Login to root 1. `useradd stian` 1. `passwd stian` 1. `usermod -aG wheel stian` 1. Confirm with `groups stian` 1. `shutdown now` 1. Start the machine and login with stian 1. Try to install something: `nix-env -i neovim`. You'll get the error "error: getting information about '//.nix-defxpr': No such file or directory". <https://github.com/NixOS/nix/issues/650> has a suggestion (`sudo nix-channel --update`) but that doesn't solve it.