nixos-generators/formats/raw.nix
Dylan Frankland 3a913d1b94
allow raw disk size to automatically increment
removes the 2GB limit on raw disks
2021-05-21 20:35:12 -07:00

27 lines
569 B
Nix

{ config, lib, pkgs, modulesPath, ... }:
{
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
boot = {
growPartition = true;
kernelParams = [ "console=ttyS0" ];
loader.grub.device = lib.mkDefault "/dev/vda";
loader.timeout = 0;
initrd.availableKernelModules = [ "uas" ];
};
system.build.raw = import "${toString modulesPath}/../lib/make-disk-image.nix" {
inherit lib config pkgs;
diskSize = "auto";
format = "raw";
};
formatAttr = "raw";
filename = "*.img";
}