diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 3f16677ead65..cbb9bbff6876 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -187,6 +187,9 @@ - `services.roundcube.maxAttachmentSize` will multiply the value set with `1.37` to offset overhead introduced by the base64 encoding applied to attachments. +- The `services.mxisd` module has been removed as both [mxisd](https://github.com/kamax-matrix/mxisd) and [ma1sd](https://github.com/ma1uta/ma1sd) are not maintained any longer. + Consequently the package `pkgs.ma1sd` has also been removed. + ## Other Notable Changes {#sec-release-24.11-notable-changes} diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index f26917c0bad5..36a1a054fea9 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -180,7 +180,7 @@ in #dnsmasq = 141;# dynamically allocated as of 2021-09-03 #uhub = 142; # unused yandexdisk = 143; - mxisd = 144; # was once collectd + # mxisd = 144; # removed 2024-07-10 #consul = 145;# dynamically allocated as of 2021-09-03 #mailpile = 146; # removed 2022-01-12 redmine = 147; @@ -503,7 +503,7 @@ in #dnsmasq = 141; # unused uhub = 142; #yandexdisk = 143; # unused - mxisd = 144; # was once collectd + # mxisd = 144; # removed 2024-07-10 #consul = 145; # unused #mailpile = 146; # removed 2022-01-12 redmine = 147; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index fc62e9db1785..f0d7fefe9cf2 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1085,7 +1085,6 @@ ./services/networking/mullvad-vpn.nix ./services/networking/multipath.nix ./services/networking/murmur.nix - ./services/networking/mxisd.nix ./services/networking/mycelium.nix ./services/networking/namecoind.nix ./services/networking/nar-serve.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index d4661a19188c..a4c0f0d5c25e 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, ... }: let inherit (lib) @@ -74,6 +74,7 @@ in (mkRemovedOptionModule [ "services" "mathics" ] "The Mathics module has been removed") (mkRemovedOptionModule [ "services" "meguca" ] "Use meguca has been removed from nixpkgs") (mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.") + (mkRemovedOptionModule [ "services" "mxisd" ] "The mxisd module has been removed as both mxisd and ma1sd got removed.") (mkRemovedOptionModule [ "services" "moinmoin" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "mwlib" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "pantheon" "files" ] '' diff --git a/nixos/modules/services/networking/mxisd.nix b/nixos/modules/services/networking/mxisd.nix deleted file mode 100644 index e53fb71788cd..000000000000 --- a/nixos/modules/services/networking/mxisd.nix +++ /dev/null @@ -1,137 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - isMa1sd = - package: - lib.hasPrefix "ma1sd" package.name; - - isMxisd = - package: - lib.hasPrefix "mxisd" package.name; - - cfg = config.services.mxisd; - - server = optionalAttrs (cfg.server.name != null) { inherit (cfg.server) name; } - // optionalAttrs (cfg.server.port != null) { inherit (cfg.server) port; }; - - baseConfig = { - matrix.domain = cfg.matrix.domain; - key.path = "${cfg.dataDir}/signing.key"; - storage = { - provider.sqlite.database = if isMa1sd cfg.package - then "${cfg.dataDir}/ma1sd.db" - else "${cfg.dataDir}/mxisd.db"; - }; - } // optionalAttrs (server != {}) { inherit server; }; - - # merges baseConfig and extraConfig into a single file - fullConfig = recursiveUpdate baseConfig cfg.extraConfig; - - configFile = if isMa1sd cfg.package - then pkgs.writeText "ma1sd-config.yaml" (builtins.toJSON fullConfig) - else pkgs.writeText "mxisd-config.yaml" (builtins.toJSON fullConfig); - -in { - options = { - services.mxisd = { - enable = mkEnableOption "matrix federated identity server"; - - package = mkPackageOption pkgs "ma1sd" { }; - - environmentFile = mkOption { - type = types.nullOr types.str; - default = null; - description = '' - Path to an environment-file which may contain secrets to be - substituted via `envsubst`. - ''; - }; - - dataDir = mkOption { - type = types.str; - default = "/var/lib/mxisd"; - description = "Where data mxisd/ma1sd uses resides"; - }; - - extraConfig = mkOption { - type = types.attrs; - default = {}; - description = "Extra options merged into the mxisd/ma1sd configuration"; - }; - - matrix = { - - domain = mkOption { - type = types.str; - description = '' - the domain of the matrix homeserver - ''; - }; - - }; - - server = { - - name = mkOption { - type = types.nullOr types.str; - default = null; - description = '' - Public hostname of mxisd/ma1sd, if different from the Matrix domain. - ''; - }; - - port = mkOption { - type = types.nullOr types.int; - default = null; - description = '' - HTTP port to listen on (unencrypted) - ''; - }; - - }; - - }; - }; - - config = mkIf cfg.enable { - users.users.mxisd = - { - group = "mxisd"; - home = cfg.dataDir; - createHome = true; - shell = "${pkgs.bash}/bin/bash"; - uid = config.ids.uids.mxisd; - }; - - users.groups.mxisd = - { - gid = config.ids.gids.mxisd; - }; - - systemd.services.mxisd = { - description = "a federated identity server for the matrix ecosystem"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - serviceConfig = let - executable = if isMa1sd cfg.package then "ma1sd" else "mxisd"; - in { - Type = "simple"; - User = "mxisd"; - Group = "mxisd"; - EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; - ExecStart = "${cfg.package}/bin/${executable} -c ${cfg.dataDir}/mxisd-config.yaml"; - ExecStartPre = "${pkgs.writeShellScript "mxisd-substitute-secrets" '' - umask 0077 - ${pkgs.envsubst}/bin/envsubst -o ${cfg.dataDir}/mxisd-config.yaml \ - -i ${configFile} - ''}"; - WorkingDirectory = cfg.dataDir; - Restart = "on-failure"; - }; - }; - }; -} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8d67843a81ef..f9678260dcbb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -596,7 +596,6 @@ in { musescore = handleTestOn ["x86_64-linux"] ./musescore.nix {}; munin = handleTest ./munin.nix {}; mutableUsers = handleTest ./mutable-users.nix {}; - mxisd = handleTest ./mxisd.nix {}; mycelium = handleTest ./mycelium {}; mympd = handleTest ./mympd.nix {}; mysql = handleTest ./mysql/mysql.nix {}; diff --git a/nixos/tests/mxisd.nix b/nixos/tests/mxisd.nix deleted file mode 100644 index 354612a8a53d..000000000000 --- a/nixos/tests/mxisd.nix +++ /dev/null @@ -1,21 +0,0 @@ -import ./make-test-python.nix ({ pkgs, ... } : { - - name = "mxisd"; - meta = with pkgs.lib.maintainers; { - maintainers = [ mguentner ]; - }; - - nodes = { - server = args : { - services.mxisd.enable = true; - services.mxisd.matrix.domain = "example.org"; - }; - }; - - testScript = '' - start_all() - server.wait_for_unit("mxisd.service") - server.wait_for_open_port(8090) - server.succeed("curl -Ssf 'http://127.0.0.1:8090/_matrix/identity/api/v1'") - ''; -})