Skip to content

dawarich: init at 0.37.3, nixos/dawarich: init#423867

Merged
dasJ merged 5 commits intoNixOS:masterfrom
diogotcorreia:dawarich-init
Jan 19, 2026
Merged

dawarich: init at 0.37.3, nixos/dawarich: init#423867
dasJ merged 5 commits intoNixOS:masterfrom
diogotcorreia:dawarich-init

Conversation

@diogotcorreia
Copy link
Member

@diogotcorreia diogotcorreia commented Jul 9, 2025

New package/module: Dawarich

Closes #345622

At least partially working, since the home page loads and I can login. Fully working

I've taken a lot of inspiration from mastodon's package and module, since it is essentially the same stack. There are still some mentions to mastodon in the code that need cleanup.

TODO list:

  • Add updater script
  • Add option for SECRET_KEY_BASE
  • Fix listening on unix socket (if that's even supported) it's not
  • Handle SMTP
  • Better testing
  • Add utility to enter rails console (it's used multiple times in upstream's documentation, so it might be useful)
  • Solve other TODOs in the code

Blockers:

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/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (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, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@diogotcorreia diogotcorreia marked this pull request as draft July 9, 2025 18:59
@diogotcorreia
Copy link
Member Author

Testing instructions (let me know if there's a better way):

  • Run nix-build -A dawarich.tests.dawarich.driverInteractive
  • Start the tests with ./result/bin/nixos-test-driver
  • In the Python console, run start_all() to init the VM
  • Then forward the port with machine.forward_port(guest_port=3000, host_port=3000)
  • Finally, open port by running machine.shell_interactive() and then nixos-firewall-tool open tcp 3000

You can then access Dawarich at http://localhost:3000

@nixpkgs-ci nixpkgs-ci 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/` 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Jul 9, 2025
@hesiod hesiod self-requested a review July 12, 2025 11:12
@diogotcorreia diogotcorreia changed the title dawarich: init at 0.29.1, nixos/dawarich: init dawarich: init at 0.30.6, nixos/dawarich: init Jul 30, 2025
@h7x4 h7x4 added 8.has: module (new) This PR adds a module in `nixos/` 8.has: tests This PR has tests labels Sep 11, 2025
@Pablo1107
Copy link
Contributor

Pablo1107 commented Sep 13, 2025

Add utility to enter rails console (it's used multiple times in upstream's documentation, so it might be useful)

I feel like this could be added as followup issue so it doesn't stop this to be merged as maybe someone can deploy without needing this.

@diogotcorreia
Copy link
Member Author

@Pablo1107 I have a bit more time now and will resume work on this PR next week :)

Copy link
Member

@jackrosenberg jackrosenberg 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! Just small style things :) Keep up the good work

Comment on lines +66 to +67
finalAttrs.dawarichGems
finalAttrs.dawarichGems.wrappedRuby
Copy link
Member

Choose a reason for hiding this comment

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

double?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm actually not sure, this was copied from mastodon's package and I'm not familiar enough with the ruby ecosystem to know if this is needed:

mastodonGems
mastodonGems.wrappedRuby

propagatedBuildInputs = [ mastodonGems.wrappedRuby ];
nativeBuildInputs = [ brotli ];
buildInputs = [
mastodonGems

@diogotcorreia diogotcorreia changed the title dawarich: init at 0.30.6, nixos/dawarich: init dawarich: init at 0.32.0, nixos/dawarich: init Sep 29, 2025
@diogotcorreia diogotcorreia changed the title dawarich: init at 0.32.0, nixos/dawarich: init dawarich: init at 0.34.0, nixos/dawarich: init Oct 26, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Oct 26, 2025
@diogotcorreia
Copy link
Member Author

This should now be ready. I'm just waiting on #454194 before removing the draft status.
I'll be deploying in my production instance to ensure everything still works, but local testing looked fine.

Reviews are welcome!

@diogotcorreia
Copy link
Member Author

diogotcorreia commented Oct 27, 2025

Update: deployed on my infrastructure, seems to work fine with my existing data at first glance!

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 28, 2025
@diogotcorreia diogotcorreia changed the title dawarich: init at 0.36.4, nixos/dawarich: init dawarich: init at 0.37.1, nixos/dawarich: init Dec 30, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 30, 2025
@diogotcorreia diogotcorreia changed the title dawarich: init at 0.37.1, nixos/dawarich: init dawarich: init at 0.37.2, nixos/dawarich: init Jan 5, 2026
@diogotcorreia
Copy link
Member Author

Updated the list of queues available on sidekiq

@diogotcorreia diogotcorreia changed the title dawarich: init at 0.37.2, nixos/dawarich: init dawarich: init at 0.37.3, nixos/dawarich: init Jan 12, 2026
@dasJ
Copy link
Member

dasJ commented Jan 18, 2026

@RossComputerGuy is everything good from your side? You are currently blocking the merge and I don't want to dismiss your review without pinging you first

@dasJ dasJ added this pull request to the merge queue Jan 19, 2026
Merged via the queue into NixOS:master with commit f60c306 Jan 19, 2026
30 of 32 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jan 19, 2026

Backport failed for release-25.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.11
git worktree add -d .worktree/backport-423867-to-release-25.11 origin/release-25.11
cd .worktree/backport-423867-to-release-25.11
git switch --create backport-423867-to-release-25.11
git cherry-pick -x 3fd55724a0fcd5c93d5b703392c9315e34c09c49 d6f3fdc6d921a15ab93042ce784829963822a5f7 b0cb5d3e8f52c0ecfd6205d033309ca70c39bb68 23d92890e0d321445d0a2b8c0f91878ed1cc13ab f14353c14118659611bddf4d65b30b56b3d0be52

@diogotcorreia diogotcorreia added the 8.has: port to stable This PR already has a backport to the stable release. label Jan 20, 2026
@genebean
Copy link
Contributor

Update: deployed on my infrastructure, seems to work fine with my existing data at first glance!

@diogotcorreia Any tips on how to go about migrating from a docker compose setup to this new awesomeness? If this is documented somewhere and I missed it, I apologize for the redundant question.

@diogotcorreia
Copy link
Member Author

@genebean I believe I only had to dump and restore the PostgreSQL data, but it was a while ago.
If you figure it out, I recommend writing it down on https://wiki.nixos.org

@tgarea
Copy link

tgarea commented Jan 23, 2026

Update: deployed on my infrastructure, seems to work fine with my existing data at first glance!

@diogotcorreia Any tips on how to go about migrating from a docker compose setup to this new awesomeness? If this is documented somewhere and I missed it, I apologize for the redundant question.

@genebean I will be moving from my docker setup to the nixos module. I'm not very experienced in it, but I will come back once I figure it out if no one else has responded by then.

@genebean
Copy link
Contributor

Turns out migration is a breeze now!

  1. Make sure the docker version is updated (ideally to the same as the nix one)
  2. Go to your account page and click export user data
  3. In the nix version, update the default account to match the old instance’s
  4. In nix, set nginx’s client_max_body_size to something larger than your export so that uploads do fail (I picked 200m as that covers future large GeoJSON files and such)
  5. Go to the account page and click import user data.
  6. Shortly you will see all the things back! The only difference is you will need to update clients that use the api with a new key.

I’m going to try to write up a wiki page today too

diogotcorreia added a commit to diogotcorreia/dotfiles that referenced this pull request Jan 26, 2026
@diogotcorreia diogotcorreia deleted the dawarich-init branch January 26, 2026 13:00
diogotcorreia added a commit to diogotcorreia/dotfiles that referenced this pull request Jan 26, 2026
* chore(deps): lock file maintenance

* dawarich: use upstream module since nixpkgs PR has been merged

See NixOS/nixpkgs#423867

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Diogo Correia <[email protected]>
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: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 8.has: changelog This PR adds or changes release notes 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: port to stable This PR already has a backport to the stable release. 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 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. backport release-25.11 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: darawich