From ccf080ee055c620c6adc451c1b1b29a71ec0722a Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Tue, 17 Oct 2023 23:01:15 +0200 Subject: [PATCH] amazon-ssm-agent: rename from ssm-agent --- .../manual/release-notes/rl-2311.section.md | 2 ++ nixos/modules/module-list.nix | 2 +- .../{ssm-agent.nix => amazon-ssm-agent.nix} | 19 ++++++++++++------- ...C-tests-that-fail-in-the-Nix-sandbox.patch | 0 ...-gen-don-t-use-unnecessary-constants.patch | 0 .../am/amazon-ssm-agent/package.nix} | 4 ++-- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 1 - 8 files changed, 18 insertions(+), 11 deletions(-) rename nixos/modules/services/misc/{ssm-agent.nix => amazon-ssm-agent.nix} (74%) rename pkgs/{applications/networking/cluster/ssm-agent => by-name/am/amazon-ssm-agent}/0001-Disable-NIC-tests-that-fail-in-the-Nix-sandbox.patch (100%) rename pkgs/{applications/networking/cluster/ssm-agent => by-name/am/amazon-ssm-agent}/0002-version-gen-don-t-use-unnecessary-constants.patch (100%) rename pkgs/{applications/networking/cluster/ssm-agent/default.nix => by-name/am/amazon-ssm-agent/package.nix} (98%) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 9e2afe5fd201..b7b1a71c90d8 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -325,6 +325,8 @@ - `ps3netsrv` has been replaced with the webman-mod fork, the executable has been renamed from `ps3netsrv++` to `ps3netsrv` and cli parameters have changed. +- `ssm-agent` package and module were renamed to `amazon-ssm-agent` to be consistent with the upstream package name. + ## Other Notable Changes {#sec-release-23.11-notable-changes} - The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration. diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 47b262bf4d98..673a87e49a19 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -625,6 +625,7 @@ ./services/matrix/matrix-sliding-sync.nix ./services/matrix/synapse.nix ./services/misc/airsonic.nix + ./services/misc/amazon-ssm-agent.nix ./services/misc/ananicy.nix ./services/misc/ankisyncd.nix ./services/misc/apache-kafka.nix @@ -741,7 +742,6 @@ ./services/misc/spice-autorandr.nix ./services/misc/spice-vdagentd.nix ./services/misc/spice-webdavd.nix - ./services/misc/ssm-agent.nix ./services/misc/sssd.nix ./services/misc/subsonic.nix ./services/misc/sundtek.nix diff --git a/nixos/modules/services/misc/ssm-agent.nix b/nixos/modules/services/misc/amazon-ssm-agent.nix similarity index 74% rename from nixos/modules/services/misc/ssm-agent.nix rename to nixos/modules/services/misc/amazon-ssm-agent.nix index d1f371c2bd61..0be79e759c31 100644 --- a/nixos/modules/services/misc/ssm-agent.nix +++ b/nixos/modules/services/misc/amazon-ssm-agent.nix @@ -2,7 +2,7 @@ with lib; let - cfg = config.services.ssm-agent; + cfg = config.services.amazon-ssm-agent; # The SSM agent doesn't pay attention to our /etc/os-release yet, and the lsb-release tool # in nixpkgs doesn't seem to work properly on NixOS, so let's just fake the two fields SSM @@ -16,19 +16,24 @@ let esac ''; in { - options.services.ssm-agent = { - enable = mkEnableOption (lib.mdDoc "AWS SSM agent"); + imports = [ + (mkRenamedOptionModule [ "services" "ssm-agent" "enable" ] [ "services" "amazon-ssm-agent" "enable" ]) + (mkRenamedOptionModule [ "services" "ssm-agent" "package" ] [ "services" "amazon-ssm-agent" "package" ]) + ]; + + options.services.amazon-ssm-agent = { + enable = mkEnableOption (lib.mdDoc "Amazon SSM agent"); package = mkOption { type = types.path; - description = lib.mdDoc "The SSM agent package to use"; - default = pkgs.ssm-agent.override { overrideEtc = false; }; - defaultText = literalExpression "pkgs.ssm-agent.override { overrideEtc = false; }"; + description = lib.mdDoc "The Amazon SSM agent package to use"; + default = pkgs.amazon-ssm-agent.override { overrideEtc = false; }; + defaultText = literalExpression "pkgs.amazon-ssm-agent.override { overrideEtc = false; }"; }; }; config = mkIf cfg.enable { - systemd.services.ssm-agent = { + systemd.services.amazon-ssm-agent = { inherit (cfg.package.meta) description; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; diff --git a/pkgs/applications/networking/cluster/ssm-agent/0001-Disable-NIC-tests-that-fail-in-the-Nix-sandbox.patch b/pkgs/by-name/am/amazon-ssm-agent/0001-Disable-NIC-tests-that-fail-in-the-Nix-sandbox.patch similarity index 100% rename from pkgs/applications/networking/cluster/ssm-agent/0001-Disable-NIC-tests-that-fail-in-the-Nix-sandbox.patch rename to pkgs/by-name/am/amazon-ssm-agent/0001-Disable-NIC-tests-that-fail-in-the-Nix-sandbox.patch diff --git a/pkgs/applications/networking/cluster/ssm-agent/0002-version-gen-don-t-use-unnecessary-constants.patch b/pkgs/by-name/am/amazon-ssm-agent/0002-version-gen-don-t-use-unnecessary-constants.patch similarity index 100% rename from pkgs/applications/networking/cluster/ssm-agent/0002-version-gen-don-t-use-unnecessary-constants.patch rename to pkgs/by-name/am/amazon-ssm-agent/0002-version-gen-don-t-use-unnecessary-constants.patch diff --git a/pkgs/applications/networking/cluster/ssm-agent/default.nix b/pkgs/by-name/am/amazon-ssm-agent/package.nix similarity index 98% rename from pkgs/applications/networking/cluster/ssm-agent/default.nix rename to pkgs/by-name/am/amazon-ssm-agent/package.nix index f6afcd7d884f..b884eb9ed06a 100644 --- a/pkgs/applications/networking/cluster/ssm-agent/default.nix +++ b/pkgs/by-name/am/amazon-ssm-agent/package.nix @@ -11,7 +11,7 @@ , bashInteractive , nix-update-script , testers -, ssm-agent +, amazon-ssm-agent , overrideEtc ? true }: @@ -138,7 +138,7 @@ buildGoModule rec { passthru = { updateScript = nix-update-script { }; tests.version = testers.testVersion { - package = ssm-agent; + package = amazon-ssm-agent; command = "amazon-ssm-agent --version"; }; }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index c1d23ad8fba7..3a6fe8700d39 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -849,6 +849,7 @@ mapAliases ({ spotify-unwrapped = spotify; # added 2022-11-06 spring-boot = spring-boot-cli; # added 2020-04-24 squid4 = throw "'squid4' has been renamed to/replaced by 'squid'"; # Converted to throw 2023-09-10 + ssm-agent = amazon-ssm-agent; # Added 2023-10-17 starboard-octant-plugin = throw "starboard-octant-plugin has been dropped due to needing octant which is archived"; # Added 2023-09-29 steam-run-native = steam-run; # added 2022-02-21 sumneko-lua-language-server = lua-language-server; # Added 2023-02-07 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a23e5416f95..6fd9e0d0740c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18134,7 +18134,6 @@ with pkgs; inherit (darwin) libobjc; }; - ssm-agent = callPackage ../applications/networking/cluster/ssm-agent { }; ssm-session-manager-plugin = callPackage ../applications/networking/cluster/ssm-session-manager-plugin { }; starlark = callPackage ../development/interpreters/starlark { };