Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/mautrix-discord: init #284421

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

robintown
Copy link
Contributor

@robintown robintown commented Jan 28, 2024

Description of changes

mautrix-discord has already been packaged, but as of yet no NixOS module has been provided. This is the same module that I've revived from #200462, but now with expanded hardening.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@raspher
Copy link
Member

raspher commented Jan 28, 2024

Result of nixpkgs-review pr 284421 run on aarch64-linux 1

1 package blacklisted:
  • nixos-install-tools

nixos/modules/services/matrix/mautrix-discord.nix Outdated Show resolved Hide resolved
nixos/modules/services/matrix/mautrix-discord.nix Outdated Show resolved Hide resolved
nixos/modules/services/matrix/mautrix-discord.nix Outdated Show resolved Hide resolved
nixos/modules/services/matrix/mautrix-discord.nix Outdated Show resolved Hide resolved
nixos/modules/services/matrix/mautrix-discord.nix Outdated Show resolved Hide resolved
Copy link
Member

@nu-nu-ko nu-nu-ko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@robintown
Copy link
Contributor Author

@azahi / @rrix, might one of you be willing to give this another review given your interest in #200462?

Copy link
Member

@azahi azahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to add the test file to nixos/tests/all-tests.nix. Other than that, LGTM.

mautrix-discord has already been packaged, but as of yet no NixOS module has been provided. This is the same module that I've revived from NixOS#200462, but now with expanded hardening.
@Rutherther
Copy link
Contributor

Hello, I have a few notes,

  1. It seems that there is mkIf cfg.enable twice in the code, that looks unnecessary to me.

  2. Notice for example the mautrix whatsapp bridge service copies the config first to data dir via envsubst. This allows to pass in secrets via the environment file. That can be useful for the login shared secrets etc. Also thanks to it being before registration generation you can pass something else to the config for generation of registration. The way its in this service it looks like this won't be possible.

  3. Also, would it make sense to make the dataDir configurable?

@Rutherther
Copy link
Contributor

Rutherther commented Mar 19, 2024

I have recently Made pr with mautrix-meta service that has data dir configurable, so you can take a look. #296718

@Jo-Blade
Copy link
Contributor

Jo-Blade commented May 4, 2024

Hello ! Is there anything new about this module ? Can I use it safely on my homeserver ?
Do you need some help to fix issues otherwise ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants