Closed mogorman closed 4 years ago
It looks like your issue is that you have
{
fileSystems."/nix/persist".neededForBoot = true;
}
in your config, but /nix/persist
isn't a file system. Just removing this line should make it work. /nix
should already be marked neededForBoot
, so you shouldn't have to care about that :)
I don't have that set in my config, and if i had tried it would have failed as its not valid without a device.
building Nix...
building the system configuration...
error: while evaluating the attribute 'config.system.build.toplevel' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:280:5:
while evaluating 'foldr' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:52:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:130:12:
while evaluating 'fold'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:55:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:59:8:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:123:50, called from undefined position:
while evaluating the attribute 'assertion' at /nix/store/26s6bkfh6gvq0zg0a9lgjs6p4i66r1hx-source/nixos.nix:190:11:
while evaluating 'markedNeededForBoot' at /nix/store/26s6bkfh6gvq0zg0a9lgjs6p4i66r1hx-source/nixos.nix:168:37, called from /nix/store/26s6bkfh6gvq0zg0a9lgjs6p4i66r1hx-source/nixos.nix:190:23:
while evaluating the attribute 'fileSystems."/nix/persist".neededForBoot' at undefined position:
attribute '/nix/persist' missing, at /nix/store/26s6bkfh6gvq0zg0a9lgjs6p4i66r1hx-source/nixos.nix:168:42
and the included configuration.nix
Oh, whoops, it's actually because of an assertion we're making. That should be fixed.
I've opened #13 which should fix this. Please try it out :)
tried it out, fixes the problem. thank you.
I tried following the blog post
On my machine I get the following error when trying to switch
my machine is setup that /nix is filesystem and /nix/persist is a folder inside of it.
This config from the blog post is working with the home-manager module but not with the nixos one.
Is there a way to make this work without making my persist dir the root dir of a filesystem?