summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-04-17 21:12:36 +0100
committerGitHub <noreply@github.com>2018-04-17 21:12:36 +0100
commit6bd83e624c1d3478a255044704fd173ad84198fd (patch)
tree15579bf48b664a189dcb834ad5a164492a38b185
parentd3cd910ee050ca0dca20e1b520ca56e28fe97a8b (diff)
parent28e352cff827f24d662de14c9c820d7746941689 (diff)
downloadnixpkgs-6bd83e624c1d3478a255044704fd173ad84198fd.tar
nixpkgs-6bd83e624c1d3478a255044704fd173ad84198fd.tar.gz
nixpkgs-6bd83e624c1d3478a255044704fd173ad84198fd.tar.bz2
nixpkgs-6bd83e624c1d3478a255044704fd173ad84198fd.tar.lz
nixpkgs-6bd83e624c1d3478a255044704fd173ad84198fd.tar.xz
nixpkgs-6bd83e624c1d3478a255044704fd173ad84198fd.tar.zst
nixpkgs-6bd83e624c1d3478a255044704fd173ad84198fd.zip
Merge pull request #39072 from jbgi/azure-agent-mount-resource-option
Azure agent mount resource option + bash to path
-rw-r--r--nixos/modules/virtualisation/azure-agent.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix
index 201d5f71ba3..b7ab54aab7e 100644
--- a/nixos/modules/virtualisation/azure-agent.nix
+++ b/nixos/modules/virtualisation/azure-agent.nix
@@ -66,6 +66,10 @@ in
       default = false;
       description = "Whether to enable verbose logging.";
     };
+    mountResourceDisk = mkOption {
+      default = true;
+      description = "Whether the agent should format (ext4) and mount the resource disk to /mnt/resource.";
+    };
   };
 
   ###### implementation
@@ -112,7 +116,7 @@ in
         Provisioning.ExecuteCustomData=n
 
         # Format if unformatted. If 'n', resource disk will not be mounted.
-        ResourceDisk.Format=y
+        ResourceDisk.Format=${if cfg.mountResourceDisk then "y" else "n"}
 
         # File system on the resource disk
         # Typically ext3 or ext4. FreeBSD images should use 'ufs2' here.
@@ -181,7 +185,7 @@ in
       after = [ "network-online.target" "sshd.service" ];
       wants = [ "network-online.target" ];
 
-      path = [ pkgs.e2fsprogs ];
+      path = [ pkgs.e2fsprogs pkgs.bash ];
       description = "Windows Azure Agent Service";
       unitConfig.ConditionPathExists = "/etc/waagent.conf";
       serviceConfig = {