Make GCE image as small as possible and incorporate partition growing
when users of nixops specified a larger root disk via deployment.gce.rootDiskSize 1GB is the smallest possible size as GCP doesn't support fractions of GB for RAW images, see https://cloud.google.com/compute/docs/images/import-existing-image#requirements
This commit is contained in:
parent
50adc53207
commit
72ec884cc6
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
diskSize = "100G";
|
||||
diskSize = "1G";
|
||||
in
|
||||
{
|
||||
imports = [ ../profiles/headless.nix ../profiles/qemu-guest.nix ];
|
||||
imports = [ ../profiles/headless.nix ../profiles/qemu-guest.nix ./grow-partition.nix ];
|
||||
|
||||
# https://cloud.google.com/compute/docs/tutorials/building-images
|
||||
networking.firewall.enable = mkDefault false;
|
||||
|
@ -94,7 +94,10 @@ in
|
|||
''
|
||||
);
|
||||
|
||||
fileSystems."/".label = "nixos";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
autoResize = true;
|
||||
};
|
||||
|
||||
boot.kernelParams = [ "console=ttyS0" "panic=1" "boot.panic_on_fail" ];
|
||||
boot.initrd.kernelModules = [ "virtio_scsi" ];
|
||||
|
|
Loading…
Reference in a new issue