amazon-grow-partition module: rename to grow-partition

+20 -5
+17 -4
nixos/modules/virtualisation/amazon-grow-partition.nix nixos/modules/virtualisation/grow-partition.nix
··· 1 - # This module automatically grows the root partition on Amazon EC2 HVM 2 - # instances. This allows an instance to be created with a bigger root 3 - # filesystem than provided by the AMI. 1 + # This module automatically grows the root partition on virtual machines. 2 + # This allows an instance to be created with a bigger root filesystem 3 + # than provided by the machine image. 4 4 5 5 { config, lib, pkgs, ... }: 6 6 7 7 { 8 - config = lib.mkIf config.ec2.hvm { 8 + 9 + options = { 10 + 11 + virtualisation.growPartition = mkOption { 12 + type = types.bool; 13 + default = true; 14 + }; 15 + 16 + }; 17 + 18 + config = mkIf config.virtualisation.growPartition { 19 + 9 20 boot.initrd.extraUtilsCommands = '' 10 21 copy_bin_and_libs ${pkgs.gawk}/bin/gawk 11 22 copy_bin_and_libs ${pkgs.gnused}/bin/sed ··· 24 35 udevadm settle 25 36 fi 26 37 ''; 38 + 27 39 }; 40 + 28 41 }
+3 -1
nixos/modules/virtualisation/amazon-image.nix
··· 11 11 let cfg = config.ec2; in 12 12 13 13 { 14 - imports = [ ../profiles/headless.nix ./ec2-data.nix ./amazon-grow-partition.nix ./amazon-init.nix ]; 14 + imports = [ ../profiles/headless.nix ./ec2-data.nix ./grow-partition.nix ./amazon-init.nix ]; 15 15 16 16 config = { 17 + 18 + virtualisation.growPartition = cfg.hvm; 17 19 18 20 fileSystems."/" = { 19 21 device = "/dev/disk/by-label/nixos";