Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions nixos/modules/services/system/cloud-init.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
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 cfg.btrfs.enable btrfs-progs
++ optional cfg.ext4.enable e2fsprogs
;
in
{
options = {

services.cloud-init = {

enable = mkOption {
type = types.bool;
default = false;
Expand All @@ -29,6 +36,22 @@ in
'';
};

btrfs.enable = mkOption {
type = types.bool;
default = false;
description = ''
Allow the cloud-init service to operate `btrfs` filesystem.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, what does it mean to "operate" a filesystem?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe provision or create?

'';
};

ext4.enable = mkOption {
type = types.bool;
default = true;
description = ''
Allow the cloud-init service to operate `ext4` filesystem.
'';
};

config = mkOption {
type = types.str;
default = ''
Expand Down