mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
Merge pull request #24360 from clefru/gce-image-shrink-on-master
Shrink GCE bootstrap image to minimum size, and auto-expand it to actual size on first boot.
This commit is contained in:
commit
fa4eff9b52
|
@ -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