summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorDing Xiang Fei <dingxiangfei2009@gmail.com>2018-11-11 00:07:48 +0800
committerDing Xiang Fei <dingxiangfei2009@gmail.com>2018-11-13 13:14:34 +0800
commita965921af95859ec78f8f5b59f94e78a87d2d57b (patch)
tree19097b284483cf09c16e716e4e4eb0f5c5415cc0 /nixos
parent50602de85e3da378e6ccc449a2a75bc5b5da7d9b (diff)
allow cloud-init to support creating btrfs partitions
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/system/cloud-init.nix27
1 files changed, 26 insertions, 1 deletions
diff --git a/nixos/modules/services/system/cloud-init.nix b/nixos/modules/services/system/cloud-init.nix
index 1a700828ce77..59f57307098b 100644
--- a/nixos/modules/services/system/cloud-init.nix
+++ b/nixos/modules/services/system/cloud-init.nix
@@ -3,7 +3,16 @@
with lib;
let cfg = config.services.cloud-init;
- path = with pkgs; [ cloud-init nettools utillinux e2fsprogs shadow openssh iproute ];
+ path = with pkgs; [
+ cloud-init
+ iproute
+ nettools
+ openssh
+ shadow
+ utillinux
+ ] ++ optional config.services.cloud-init.btrfs btrfs-progs
+ ++ optional config.services.cloud-init.ext4 e2fsprogs
+ ;
in
{
options = {
@@ -29,6 +38,22 @@ in
'';
};
+ btrfs = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Allow the cloud-init service to operate `btrfs` filesystem.
+ '';
+ };
+
+ ext4 = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Allow the cloud-init service to operate `ext4` filesystem.
+ '';
+ };
+
config = mkOption {
type = types.str;
default = ''