Unverified Commit f2506eae authored by Jonas Chevalier's avatar Jonas Chevalier Committed by GitHub
Browse files

Merge pull request #324102 from johannwagner/fix/cloud-init-fixes

nixos/cloud-init: Bug fix and enhancements
parents 708807d6 49d137a9
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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)";