31 lines
837 B
Nix
31 lines
837 B
Nix
{ config, lib, pkgs, modulesPath, ... }:
|
|
with lib;
|
|
|
|
{
|
|
system.build.nvmeImage = import "${modulesPath}/../lib/make-disk-image.nix" {
|
|
inherit config lib pkgs;
|
|
diskSize = 8*1024; # megabytes
|
|
# TODO: zstd
|
|
format = "raw"; # one of qcow2, qcow2-compressed, vdi, vpc, raw.
|
|
installBootLoader = true;
|
|
partitionTableType = "efi";
|
|
configFile = pkgs.writeText "configuration.nix" ''
|
|
{
|
|
imports = [ <./machine-config.nix> ];
|
|
}
|
|
'';
|
|
};
|
|
|
|
boot.growPartition = true;
|
|
boot.initrd.kernelModules = [ "nvme" ];
|
|
/** /
|
|
boot.loader.grub.efiSupport = true;
|
|
boot.loader.grub.efiInstallAsRemovable = true;
|
|
boot.loader.grub.device = "nodev";
|
|
/**/
|
|
|
|
fileSystems."/boot" = { device = "/dev/nvme0n1p1"; fsType = "vfat"; };
|
|
fileSystems."/" = { device = "/dev/nvme0n1p2"; fsType = "ext4"; };
|
|
|
|
}
|