install-iso: use disko.makeDiskImage

This commit is contained in:
lassulus
2023-07-28 16:37:10 +02:00
parent 2c4667b1f5
commit 6d0dd33ff1
4 changed files with 67 additions and 3 deletions

View File

@@ -1,10 +1,16 @@
{ lib
, pkgs
, modulesPath
, ...
}: {
systemd.tmpfiles.rules = [
"d /var/shared 0777 root root - -"
];
imports = [
(modulesPath + "/profiles/installation-device.nix")
(modulesPath + "/profiles/all-hardware.nix")
(modulesPath + "/profiles/base.nix")
];
services.openssh.settings.PermitRootLogin = "yes";
system.activationScripts.root-password = ''
mkdir -p /var/shared
@@ -34,7 +40,41 @@
cat /var/shared/qrcode.utf8
fi
'';
formatConfigs.install-iso = {
isoImage.squashfsCompression = "zstd -Xcompression-level 1";
boot.loader.grub.efiInstallAsRemovable = true;
boot.loader.grub.efiSupport = true;
disko.devices = {
disk = {
stick = {
type = "disk";
device = "/vda";
imageSize = "3G";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "100M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}