Unverified Commit ab0e8e5b authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 7ab01e09 c1bdc0da
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -670,7 +670,7 @@ lib.mapAttrs mkLicense ({
  # Intel's license, seems free
  iasl = {
    spdxId = "Intel-ACPI";
    fullName = "iASL";
    fullName = "Intel ACPI Software License Agreement";
    url = "https://old.calculate-linux.org/packages/licenses/iASL";
  };

@@ -889,7 +889,7 @@ lib.mapAttrs mkLicense ({
    spdxId = "MIT";
    fullName = "MIT License";
  };
  # https://spdx.org/licenses/MIT-feh.html

  mit-feh = {
    spdxId = "MIT-feh";
    fullName = "feh License";
@@ -1097,7 +1097,7 @@ lib.mapAttrs mkLicense ({
  };

  purdueBsd = {
    fullName = " Purdue BSD-Style License"; # also know as lsof license
    fullName = "Purdue BSD-Style License"; # also known as lsof license
    url = "https://enterprise.dejacode.com/licenses/public/purdue-bsd";
  };

+8 −1
Original line number Diff line number Diff line
@@ -8832,6 +8832,13 @@
    name = "Luna Perego";
    keys = [ { fingerprint = "09E4 B981 9B93 5B0C 0B91  1274 0578 7332 9217 08FF"; } ];
  };
  hustlerone = {
    email = "nine-ball@tutanota.com";
    matrix = "@hustlerone:matrix.org";
    github = "hustlerone";
    name = "Hustler One";
    githubId = 167621692;
  };
  huyngo = {
    email = "huyngo@disroot.org";
    github = "Huy-Ngo";
@@ -11192,7 +11199,7 @@
    name = "kintrix";
  };
  kinzoku = {
    email = "kinzokudev4869@gmail.com";
    email = "kinzoku@the-nebula.xyz";
    github = "kinzoku-dev";
    githubId = 140647311;
    name = "Ayman Hamza";
+2 −0
Original line number Diff line number Diff line
@@ -464,6 +464,8 @@

- `programs.vim.defaultEditor` now only works if `programs.vim.enable` is enabled.

- `services.mautrix-meta` was updated to [0.4](https://github.com/mautrix/meta/releases/tag/v0.4.0). This release makes significant changes to the settings format. If you have custom settings you should migrate them to the new format. Unfortunately upstream provides little guidance for how to do this, but [the auto-migration code](https://github.com/mautrix/meta/blob/f5440b05aac125b4c95b1af85635a717cbc6dd0e/cmd/mautrix-meta/legacymigrate.go#L23) may serve as a useful reference. The NixOS module should warn you if you still have any old settings configured.

- The `indi-full` package no longer contains non-free drivers.
  To get the old collection of drivers use `indi-full-nonfree` or create your own collection of drivers by overriding indi-with-drivers.
  E.g.: `pkgs.indi-with-drivers.override {extraDrivers = with pkgs.indi-3rdparty; [indi-gphoto];}`
+7 −4
Original line number Diff line number Diff line
{ config, lib, pkgs, ... }:

{
  options.hardware.usbStorage.manageStartStop = lib.mkOption {
  options.hardware.usbStorage.manageShutdown = lib.mkOption {
    type = lib.types.bool;
    default = true;
    default = false;
    description = ''
      Enable this option to gracefully spin-down external storage during shutdown.
      If you suspect improper head parking after poweroff, install `smartmontools` and check
@@ -10,9 +11,11 @@
    '';
  };

  config = lib.mkIf config.hardware.usbStorage.manageStartStop {
  config = lib.mkIf config.hardware.usbStorage.manageShutdown {
    services.udev.extraRules = ''
      ACTION=="add|change", SUBSYSTEM=="scsi_disk", DRIVERS=="usb-storage", ATTR{manage_system_start_stop}="1"
      ACTION=="add|change", SUBSYSTEM=="scsi_disk", DRIVERS=="usb-storage|uas", ATTR{manage_shutdown}="1"
    '';
  };

  imports = [(lib.mkRenamedOptionModule [ "hardware" "usbStorage" "manageStartStop" ] [ "hardware" "usbStorage" "manageShutdown" ])];
}
+63 −46
Original line number Diff line number Diff line
@@ -69,11 +69,6 @@ in {
                appservice = {
                  id = "";

                  database = {
                    type = "sqlite3-fk-wal";
                    uri = "file:${fullDataDir config}/mautrix-meta.db?_txlock=immediate";
                  };

                  bot = {
                    username = "";
                  };
@@ -83,11 +78,15 @@ in {
                  address = "http://${config.settings.appservice.hostname}:${toString config.settings.appservice.port}";
                };

                meta = {
                  mode = "";
                bridge = {
                  permissions = {};
                };

                database = {
                  type = "sqlite3-fk-wal";
                  uri = "file:${fullDataDir config}/mautrix-meta.db?_txlock=immediate";
                };

                bridge = {
                # Enable encryption by default to make the bridge more secure
                encryption = {
                  allow = true;
@@ -106,6 +105,11 @@ in {
                    delete_outdated_inbound = true;
                  };

                  # TODO: This effectively disables encryption. But this is the value provided when a <0.4 config is migrated. Changing it will corrupt the database.
                  # https://github.com/mautrix/meta/blob/f5440b05aac125b4c95b1af85635a717cbc6dd0e/cmd/mautrix-meta/legacymigrate.go#L24
                  # If you wish to encrypt the local database you should set this to an environment variable substitution and reset the bridge or somehow migrate the DB.
                  pickle_key = "mautrix.bridge.e2ee";

                  verification_levels = {
                    receive = "cross-signed-tofu";
                    send = "cross-signed-tofu";
@@ -113,9 +117,6 @@ in {
                  };
                };

                  permissions = {};
                };

                logging = {
                  min_level = "info";
                  writers = lib.singleton {
@@ -124,6 +125,10 @@ in {
                    time_format = " ";
                  };
                };

                network = {
                  mode = "";
                };
              };
              defaultText = ''
              {
@@ -261,7 +266,7 @@ in {
        description = ''
          Configuration of multiple `mautrix-meta` instances.
          `services.mautrix-meta.instances.facebook` and `services.mautrix-meta.instances.instagram`
          come preconfigured with meta.mode, appservice.id, bot username, display name and avatar.
          come preconfigured with network.mode, appservice.id, bot username, display name and avatar.
        '';

        example = ''
@@ -283,7 +288,7 @@ in {
            messenger = {
              enable = true;
              settings = {
                meta.mode = "messenger";
                network.mode = "messenger";
                homeserver.domain = "example.com";
                appservice = {
                  id = "messenger";
@@ -313,9 +318,9 @@ in {
          '';
        }
        {
          assertion = builtins.elem cfg.settings.meta.mode [ "facebook" "facebook-tor" "messenger" "instagram" ];
          assertion = builtins.elem cfg.settings.network.mode [ "facebook" "facebook-tor" "messenger" "instagram" ];
          message = ''
            The option `services.mautrix-meta.instances.${name}.settings.meta.mode` has to be set
            The option `services.mautrix-meta.instances.${name}.settings.network.mode` has to be set
            to one of: facebook, facebook-tor, messenger, instagram.
            This configures the mode of the bridge.
          '';
@@ -338,6 +343,24 @@ in {
            The option `services.mautrix-meta.instances.${name}.settings.appservice.bot.username` has to be set.
          '';
        }
        {
          assertion = !(cfg.settings ? bridge.disable_xma);
          message = ''
            The option `bridge.disable_xma` has been moved to `network.disable_xma_always`. Please [migrate your configuration](https://github.com/mautrix/meta/releases/tag/v0.4.0). You may wish to use [the auto-migration code](https://github.com/mautrix/meta/blob/f5440b05aac125b4c95b1af85635a717cbc6dd0e/cmd/mautrix-meta/legacymigrate.go#L23) for reference.
          '';
        }
        {
          assertion = !(cfg.settings ? bridge.displayname_template);
          message = ''
            The option `bridge.displayname_template` has been moved to `network.displayname_template`. Please [migrate your configuration](https://github.com/mautrix/meta/releases/tag/v0.4.0). You may wish to use [the auto-migration code](https://github.com/mautrix/meta/blob/f5440b05aac125b4c95b1af85635a717cbc6dd0e/cmd/mautrix-meta/legacymigrate.go#L23) for reference.
          '';
        }
        {
          assertion = !(cfg.settings ? meta);
          message = ''
            The options in `meta` have been moved to `network`. Please [migrate your configuration](https://github.com/mautrix/meta/releases/tag/v0.4.0). You may wish to use [the auto-migration code](https://github.com/mautrix/meta/blob/f5440b05aac125b4c95b1af85635a717cbc6dd0e/cmd/mautrix-meta/legacymigrate.go#L23) for reference.
          '';
        }
      ]) enabledInstances));

      users.users = lib.mapAttrs' (name: cfg: lib.nameValuePair "mautrix-meta-${name}" {
@@ -518,11 +541,7 @@ in {
      in {
        instagram = {
          settings = {
            meta.mode = mkDefault "instagram";

            bridge = {
              username_template = mkDefault "instagram_{{.}}";
            };
            network.mode = mkDefault "instagram";

            appservice = {
              id = mkDefault "instagram";
@@ -532,16 +551,13 @@ in {
                displayname = mkDefault "Instagram bridge bot";
                avatar = mkDefault "mxc://maunium.net/JxjlbZUlCPULEeHZSwleUXQv";
              };
              username_template = mkDefault "instagram_{{.}}";
            };
          };
        };
        facebook = {
          settings = {
            meta.mode = mkDefault "facebook";

            bridge = {
              username_template = mkDefault "facebook_{{.}}";
            };
            network.mode = mkDefault "facebook";

            appservice = {
              id = mkDefault "facebook";
@@ -551,6 +567,7 @@ in {
                displayname = mkDefault "Facebook bridge bot";
                avatar = mkDefault "mxc://maunium.net/ygtkteZsXnGJLJHRchUwYWak";
              };
              username_template = mkDefault "facebook_{{.}}";
            };
          };
        };
@@ -558,5 +575,5 @@ in {
    }
  ];

  meta.maintainers = with lib.maintainers; [ rutherther ];
  meta.maintainers = with lib.maintainers; [ ];
}
Loading