From 831dbf4e0a8ce8d1b4d2830ead35461aba4a72ac Mon Sep 17 00:00:00 2001 From: kfollesdal Date: Mon, 8 Mar 2021 09:36:02 +0100 Subject: [PATCH] nixos/virtualisation/azure-common: add auto resize of os disk At the moment os disk do not automatically expand in Azure. This commit fixes this so os disk expands to whole disk when created or changed. --- nixos/modules/virtualisation/azure-common.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/azure-common.nix b/nixos/modules/virtualisation/azure-common.nix index 8efa177e30d1..dc7853b95032 100644 --- a/nixos/modules/virtualisation/azure-common.nix +++ b/nixos/modules/virtualisation/azure-common.nix @@ -21,7 +21,11 @@ with lib; # way to select them anyway. boot.loader.grub.configurationLimit = 0; - fileSystems."/".device = "/dev/disk/by-label/nixos"; + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + autoResize = true; + }; # Allow root logins only using the SSH key that the user specified # at instance creation time, ping client connections to avoid timeouts