Agenix runs before some partitions are mounted, one option is to mark those partitions are need for boot: { fileSystems."/home".neededForBoot = true; } I choose to copy my ssh key to the root user's HOME, which is not in a separate partition.