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-telegram: switch to using static user for automated registration of appservice #389679

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

thefeiter
Copy link
Contributor

@thefeiter thefeiter commented Mar 13, 2025

Things done

  1. Create a static user
  2. Add config option registerToSynapse and permission management to read registration file
  3. enable env replacement in config json and automatically add generated AS and HS tokens to config

This helps solving the Issue described here

  • 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:
  • n.a. 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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 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. afaik :)

I have tested the changes in a build-vm environment and the generation and registration of the appserveice work fine!


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: module (update) This PR changes an existing module in `nixos/` labels Mar 13, 2025
@thefeiter
Copy link
Contributor Author

If backporting means, making the change available in an older release, this would be nice for at least 24.11 I think.

@thefeiter
Copy link
Contributor Author

Infos for release notes are too insignificant I guess.

@thefeiter
Copy link
Contributor Author

I don't know of any tests belonging to this module.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Mar 13, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/setting-up-the-as-token-for-mautrix-telegram-matrix-bridge/34025/6

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Mar 13, 2025
Copy link
Contributor

@matthiasbeyer matthiasbeyer left a comment

Choose a reason for hiding this comment

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

I see nothing that would concern me. I would wait one day for either @Stunkymonkey or @pacien to say something and, if they do not respond, merge.

@matthiasbeyer
Copy link
Contributor

@thefeiter can you please rebase this and remove the merge commit?

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Mar 19, 2025
@github-actions github-actions bot removed 6.topic: jitsi 6.topic: docker tools 6.topic: systemd 6.topic: agda "A dependently typed programming language / interactive theorem prover" 6.topic: java Including JDK, tooling, other languages, other VMs 6.topic: R 6.topic: cuda Parallel computing platform and API 6.topic: vscode 6.topic: lib The Nixpkgs function library 6.topic: games 6.topic: rocm 6.topic: julia 6.topic: php 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 6.topic: k3s Kubernates distribution (https://k3s.io/) 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 6.topic: dotnet Language: .NET 6.topic: nvidia Nvidia-specific issues and fixes 6.topic: xen-project The Xen Project hypervisor 6.topic: tcl 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: teams Relating to team creation, updates, other management actions labels Mar 19, 2025
@thefeiter
Copy link
Contributor Author

@thefeiter can you please rebase this and remove the merge commit?

Seems like no. But i think we are now in a desired state :D

@matthiasbeyer
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 389679


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test

@matthiasbeyer
Copy link
Contributor

As neither @Stunkymonkey nor @pacien replied, I am gonna merge this now.

@matthiasbeyer matthiasbeyer merged commit 2a725d4 into NixOS:master Mar 19, 2025
48 of 50 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Mar 19, 2025

@Stunkymonkey
Copy link
Contributor

As neither @Stunkymonkey nor @pacien replied, I am gonna merge this now.

@matthiasbeyer sorry. i am a bit short on time. But it looks good to me. thanks for the contribution.

on little thing: using umask is not encouraged #121293

@matthiasbeyer
Copy link
Contributor

matthiasbeyer commented Mar 20, 2025

sorry. i am a bit short on time.

Don't worry about it! ❤️

using umask is not encouraged #121293

@thefeiter care to fix this up in a follow-up PR? Just for your training, you know? 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: policy discussion 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person 12. first-time contribution This PR is the author's first one; please be gentle! backport release-24.11 Backport PR automatically
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants