nixos/cloud-init: add enable suffix to ext4/btrfs

Makes the optional more self-describing and allows future extensions
This commit is contained in:
Jörg Thalheim 2018-11-13 10:28:40 +00:00
parent a965921af9
commit a5c74762cb
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA

View File

@ -10,15 +10,13 @@ let cfg = config.services.cloud-init;
openssh openssh
shadow shadow
utillinux utillinux
] ++ optional config.services.cloud-init.btrfs btrfs-progs ] ++ optional cfg.btrfs.enable btrfs-progs
++ optional config.services.cloud-init.ext4 e2fsprogs ++ optional cfg.ext4.enable e2fsprogs
; ;
in in
{ {
options = { options = {
services.cloud-init = { services.cloud-init = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -38,7 +36,7 @@ in
''; '';
}; };
btrfs = mkOption { btrfs.enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = ''
@ -46,7 +44,7 @@ in
''; '';
}; };
ext4 = mkOption { ext4.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = '' description = ''