mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
Merge pull request #324102 from johannwagner/fix/cloud-init-fixes
nixos/cloud-init: Bug fix and enhancements
This commit is contained in:
commit
f2506eaef6
@ -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.
|
||||
@ -163,7 +172,7 @@ in
|
||||
{ text = cfg.config; }
|
||||
;
|
||||
|
||||
systemd.network.enable = cfg.network.enable;
|
||||
systemd.network.enable = mkIf cfg.network.enable true;
|
||||
|
||||
systemd.services.cloud-init-local = {
|
||||
description = "Initial cloud-init job (pre-networking)";
|
||||
|
Loading…
Reference in New Issue
Block a user