Skip to content

Commit

Permalink
Enable installer for generic-x86_64
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Kharin <[email protected]>
  • Loading branch information
remimimimimi committed Sep 13, 2023
1 parent 379f3f2 commit 7034358
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions targets/generic-x86_64.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@
};
}

({config, ...}: {
ghaf.installer = {
enable = true;
imgModules = [
nixos-generators.nixosModules.raw-efi
];
enabledModules = ["flushImage"];
installerCode = ''
echo "Starting flushing..."
if sudo dd if=${config.system.build.${config.formatAttr}} of=/dev/${config.ghaf.installer.installerModules.flushImage.providedVariables.deviceName} conv=sync bs=4K status=progress; then
sync
echo "Flushing finished successfully!"
echo "Now you can detach installation device and reboot to ghaf."
else
echo "Some error occured during flushing process, exit code: $?."
exit
fi
'';
};
})

formatModule

#TODO: how to handle the majority of laptops that need a little
Expand Down

0 comments on commit 7034358

Please sign in to comment.