From d07d8a5589f80c1e93769e802ae60feb86d9ea44 Mon Sep 17 00:00:00 2001 From: codgician <15964984+codgician@users.noreply.github.com> Date: Sun, 8 Dec 2024 11:05:57 +0800 Subject: [PATCH] waagent: improve code readability and doc --- nixos/doc/manual/release-notes/rl-2505.section.md | 4 +++- nixos/modules/virtualisation/waagent.nix | 2 +- pkgs/by-name/wa/waagent/package.nix | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index da3fb519b1f4..0a1365ec0a7a 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -22,6 +22,8 @@ - [agorakit](https://github.com/agorakit/agorakit), an organization tool for citizens' collectives. Available with [services.agorakit](options.html#opt-services.agorakit.enable). +- [waagent](https://github.com/Azure/WALinuxAgent), the Microsoft Azure Linux Agent (waagent) manages Linux provisioning and VM interaction with the Azure Fabric Controller. Available with [services.waagent](options.html#opt-services.waagent.enable). + ## Backward Incompatibilities {#sec-release-25.05-incompatibilities} @@ -70,7 +72,7 @@ - `nodePackages.ganache` has been removed, as the package has been deprecated by upstream. -- `services.waagent` option has been added, making `/etc/waagent.conf` customizable. `virtualisation.azure.agent` option provided by `azure-agent.nix` module has been deprecated and the module will be removed in a future release. +- `virtualisation.azure.agent` option provided by `azure-agent.nix` is replaced by `services.waagent`, and will be removed in a future release. - `containerd` has been updated to v2, which contains breaking changes. See the [containerd 2.0](https://github.com/containerd/containerd/blob/main/docs/containerd-2.0.md) documentation for more diff --git a/nixos/modules/virtualisation/waagent.nix b/nixos/modules/virtualisation/waagent.nix index af6ae5bc642d..afdcfd6ebe35 100644 --- a/nixos/modules/virtualisation/waagent.nix +++ b/nixos/modules/virtualisation/waagent.nix @@ -247,7 +247,7 @@ in config = lib.mkIf cfg.enable { assertions = [ { - assertion = cfg.settings.HttpProxy.Host == null || cfg.settings.HttpProxy.Port != null; + assertion = (cfg.settings.HttpProxy.Host != null) -> (cfg.settings.HttpProxy.Port != null); message = "Option services.waagent.settings.HttpProxy.Port must be set if services.waagent.settings.HttpProxy.Host is set."; } ]; diff --git a/pkgs/by-name/wa/waagent/package.nix b/pkgs/by-name/wa/waagent/package.nix index f18794ac242f..66b38f8d7a27 100644 --- a/pkgs/by-name/wa/waagent/package.nix +++ b/pkgs/by-name/wa/waagent/package.nix @@ -74,7 +74,7 @@ python.pkgs.buildPythonApplication rec { }; }; - meta = with lib; { + meta = { description = "Microsoft Azure Linux Agent (waagent)"; mainProgram = "waagent"; longDescription = '' @@ -82,7 +82,8 @@ python.pkgs.buildPythonApplication rec { manages Linux provisioning and VM interaction with the Azure Fabric Controller''; homepage = "https://github.com/Azure/WALinuxAgent"; - maintainers = with maintainers; [ codgician ]; - license = with licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ codgician ]; + license = with lib.licenses; [ asl20 ]; + platforms = lib.platforms.linux; }; }