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.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` labels Jan 28, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jan 28, 2024
@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

@h7x4 h7x4 added 8.has: module (new) This PR adds a module in `nixos/` 8.has: tests This PR has tests labels Jan 29, 2024
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
@robintown robintown force-pushed the mautrix-discord-service branch from f8594ee to c00a1ff Compare February 8, 2024 00:24
@robintown robintown requested a review from fsnkty February 8, 2024 00:29
Copy link
Member

@fsnkty fsnkty 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!

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Feb 8, 2024
@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.

@robintown robintown force-pushed the mautrix-discord-service branch from c00a1ff to b1b5fcf Compare February 15, 2024 12:59
@robintown robintown requested a review from azahi February 15, 2024 12:59
@patka-123 patka-123 added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Feb 25, 2024
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.
@robintown robintown force-pushed the mautrix-discord-service branch from b1b5fcf to b594aeb Compare February 29, 2024 14:59
@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?

@wegank wegank removed the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Mar 8, 2024
@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

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 3, 2024
@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
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: tests This PR has tests 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants