nixos/cloud-init: Allow additional packages in cloud-init module

This commit is contained in:
Johann Wagner 2024-07-02 19:19:56 +02:00
parent 33c55024dc
commit 49d137a967

View File

@ -16,6 +16,7 @@ let
++ optional cfg.btrfs.enable btrfs-progs
++ optional cfg.ext4.enable e2fsprogs
++ optional cfg.xfs.enable xfsprogs
++ cfg.extraPackages
;
hasFs = fsName: lib.any (fs: fs.fsType == fsName) (lib.attrValues config.fileSystems);
settingsFormat = pkgs.formats.yaml { };
@ -79,6 +80,14 @@ in
'';
};
extraPackages = mkOption {
type = types.listOf types.package;
default = [ ];
description = ''
List of additional packages to be available within cloud-init jobs.
'';
};
settings = mkOption {
description = ''
Structured cloud-init configuration.