Skip to content

nixos/memos: init module - #426687

Merged
MattSturgeon merged 1 commit into
NixOS:masterfrom
M0ustach3:init-memos-nixos-module
Aug 31, 2025
Merged

MattSturgeon merged 1 commit into
NixOS:masterfrom
M0ustach3:init-memos-nixos-module

Conversation

@M0ustach3

Copy link
Copy Markdown
Contributor

Added NixOS module for memos

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and others READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 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. 12.first-time contribution This PR is the author's first one; please be gentle! 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: documentation This PR adds or changes documentation labels Jul 19, 2025
@M0ustach3
M0ustach3 force-pushed the init-memos-nixos-module branch from 010d2c9 to bc88f00 Compare July 19, 2025 15:37
@nixpkgs-ci nixpkgs-ci Bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 19, 2025

@acid-bong acid-bong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The rest of the module looks great tho

Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
@nixpkgs-ci nixpkgs-ci Bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 20, 2025
@M0ustach3
M0ustach3 force-pushed the init-memos-nixos-module branch from bc88f00 to ec780f0 Compare July 21, 2025 07:25
@M0ustach3

Copy link
Copy Markdown
Contributor Author

Thanks for the review @acid-bong , fixed the comments in the new commit

@M0ustach3

Copy link
Copy Markdown
Contributor Author

Anyone has any idea on why the PR failed ? It only had a 500 error in one of the checks but have no idea why : https://github.com/NixOS/nixpkgs/actions/runs/16410988062/job/46365736372?pr=426687

@acid-bong

Copy link
Copy Markdown
Contributor

Close and reopen the PR

@M0ustach3 M0ustach3 closed this Jul 22, 2025
@M0ustach3 M0ustach3 reopened this Jul 22, 2025

@acid-bong acid-bong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay, CI is happy, so am I. Thx for the contribution and good luck nixing

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 12.first-time contribution This PR is the author's first one; please be gentle! labels Jul 22, 2025
@wariuccio

Copy link
Copy Markdown
Contributor

Hello @M0ustach3, is there anything blocking this PR from being merged?
I'm interested in using Memos and looking forward to the module to give it a try

@M0ustach3

Copy link
Copy Markdown
Contributor Author

Hi @wariuccio , nothing is blocking the PR from being merge but, as I'm not currently a maintainer of this module, I can't merge It and (I suppose?) I have to wait for a Nix maintainer to merge it.

From what I can see, the passthru.tests on x86_64 darwin CI is still waiting from 24 days ago, don't know If this is related.

Cheers

@nixos-discourse

Copy link
Copy Markdown

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

https://discourse.nixos.org/t/prs-already-reviewed/2617/2529

@MattSturgeon MattSturgeon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't see any obvious issues. Thanks for the contribution! Some code style feedback below:

Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
@M0ustach3
M0ustach3 force-pushed the init-memos-nixos-module branch from ec780f0 to 466a68d Compare August 30, 2025 08:06
@M0ustach3

Copy link
Copy Markdown
Contributor Author

Hi @MattSturgeon ! Thanks a lot for the review and for all your comments on improving my future Nix code !

Made all the changed you suggested !

Cheers,

@M0ustach3
M0ustach3 requested a review from MattSturgeon August 30, 2025 08:08

@MattSturgeon MattSturgeon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for addressing my feedback!

I missed a few minor things that I should've brought up in the last review (sorry). Nothing too major though.

None of the remaining feedback blocks merging (some is purely discussion), so I'll approve now. Let me know your thoughts on individual threads.

Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Aug 30, 2025
@M0ustach3
M0ustach3 force-pushed the init-memos-nixos-module branch from 466a68d to f71157f Compare August 30, 2025 16:54
@nixpkgs-ci nixpkgs-ci Bot added 2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Aug 30, 2025
@nix-owners
nix-owners Bot requested review from OPNA2608 and onny August 30, 2025 17:04
@M0ustach3
M0ustach3 force-pushed the init-memos-nixos-module branch from f71157f to 9c2999d Compare August 30, 2025 17:04
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. and removed 2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. labels Aug 30, 2025
@M0ustach3

M0ustach3 commented Aug 30, 2025 •

Copy link
Copy Markdown
Contributor Author

Apologies for the mentions in this PR and for CI fails. I have no idea why but my repo somehow rebased some commits from master.

Anyway, I improved the code to match @MattSturgeon 's suggestions, and moved to a more generic way of specifying settings.

Cheers,

@MattSturgeon MattSturgeon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Some minor feedback on some of the new code:

Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Resolved
Comment thread nixos/modules/services/misc/memos.nix Outdated
Comment on lines 83 to 96

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No objection to having this note in the description. However it feels a little redundant to repeat the default text (which is shown immediately after the description).

If you do have it in both places, this may be a good spot to have a clickable link:

Suggested change
::: {.note}
By default, generated from {option}`services.memos.settings`.
:::
::: {.note}
By default, generated from [](opt-services.memos.settings).
:::

or

Suggested change
::: {.note}
By default, generated from {option}`services.memos.settings`.
:::
::: {.note}
By default, generated from [](opt-${opt.settings}).
:::

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Totally right, I kept the second suggested change, and removed the defaultText

@MattSturgeon MattSturgeon Aug 31, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I kept the second suggested change, and removed the defaultText

Sorry for the confusion:

If the option declares a non-static default, then we must also declare defaultText. If we don't declare defaultText, the docs will evaluate default and render it as the documented default value.

There are two solutions here:

  • Don't pass default to mkOption and instead define an undocumented default via a mkOptionDefault config definition.
  • Pass both default and defaultText to mkOption

It's fine to have an undocumented default if the description makes the default clear. Although, my personal preference is usually to use the standard default and defaultText attributes for defining and documenting the default. That said, I can see why you'd prefer a note admonition to the usual default field.

Entirely up to you.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup, I indeed removed the defaultText and CI wasn't happy about it x) So i used your suggestion of

defaultText = lib.literalMD ''
  generated from {option}`${opt.settings}`
'';

@M0ustach3
M0ustach3 force-pushed the init-memos-nixos-module branch from 9c2999d to 0d0a75e Compare August 31, 2025 10:27
@M0ustach3
M0ustach3 force-pushed the init-memos-nixos-module branch from 0d0a75e to ad0a995 Compare August 31, 2025 10:34
@M0ustach3

Copy link
Copy Markdown
Contributor Author

Hi,
Updated this PR with your changes @MattSturgeon ! Thanks again for reviewing.

Cheers,

@M0ustach3
M0ustach3 requested a review from MattSturgeon August 31, 2025 12:39
@MattSturgeon
MattSturgeon merged commit 9bd3862 into NixOS:master Aug 31, 2025
@MattSturgeon

Copy link
Copy Markdown
Contributor

Thanks!

@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Sep 11, 2025
@M0ustach3
M0ustach3 deleted the init-memos-nixos-module branch October 16, 2025 07:31
samueldr-at-cyberus added a commit to samueldr-at-cyberus/nixpkgs that referenced this pull request Jan 27, 2026
Two different PRs, two different issues.

The first PR, chronologically-merged-in, NixOS#426687 introduced a new
module, and while reviewers “reviewed” the `meta.maintainers` entry,
they did not notice the maintainer was not in the maintainers list file.

 - NixOS#426687 (comment)

Then, in NixOS#437310, merged a few days later, another new module was added
with M0ustach3 as a maintainer. At the very least, an attempt was made
in de66c73 to add the maintainer to the
list, but an unfortunate typo (or two?) in the maintainers list entry
means the two intended usage of the new entry still don't work.

The issue here is not from the contributors. The reviewers and
committers could have done better, but it's not even truly their fault.
The issue is the meta information in NixOS modules was never checked. In
any way AFAICT. Otherwise this would have been caught immediately, and
not four months later.

Anyway, the intent clearly is that the entry should matche the GitHub
username.
samueldr-at-cyberus added a commit to samueldr-at-cyberus/nixpkgs that referenced this pull request Jan 27, 2026
Two different PRs, two different issues.

The first PR, chronologically-merged-in, NixOS#426687 introduced a new
module, and while reviewers “reviewed” the `meta.maintainers` entry,
they did not notice the maintainer was not in the maintainers list file.

 - NixOS#426687 (comment)

Then, in NixOS#437310, merged a few days later, another new module was added
with M0ustach3 as a maintainer. At the very least, an attempt was made
in de66c73 to add the maintainer to the
list, but an unfortunate typo (or two?) in the maintainers list entry
means the two intended usage of the new entry still don't work.

The issue here is not from the contributors. The reviewers and
committers could have done better, but it's not even truly their fault.
The issue is the meta information in NixOS modules was never checked. In
any way AFAICT. Otherwise this would have been caught immediately, and
not four months later.

Anyway, the intent clearly is that the entry should matche the GitHub
username.
samueldr-at-cyberus added a commit to samueldr-at-cyberus/nixpkgs that referenced this pull request Jan 27, 2026
Two different PRs, two different issues.

The first PR, chronologically-merged-in, NixOS#426687 introduced a new
module, and while reviewers “reviewed” the `meta.maintainers` entry,
they did not notice the maintainer was not in the maintainers list file.

 - NixOS#426687 (comment)

Then, in NixOS#437310, merged a few days later, another new module was added
with M0ustach3 as a maintainer. At the very least, an attempt was made
in de66c73 to add the maintainer to the
list, but an unfortunate typo (or two?) in the maintainers list entry
means the two intended usage of the new entry still don't work.

The issue here is not from the contributors. The reviewers and
committers could have done better, but it's not even truly their fault.
The issue is the meta information in NixOS modules was never checked. In
any way AFAICT. Otherwise this would have been caught immediately, and
not four months later.

Anyway, the intent clearly is that the entry should matche the GitHub
username.
philiptaron pushed a commit to philiptaron/nixpkgs that referenced this pull request Jan 27, 2026
Two different PRs, two different issues.

The first PR, chronologically-merged-in, NixOS#426687 introduced a new
module, and while reviewers “reviewed” the `meta.maintainers` entry,
they did not notice the maintainer was not in the maintainers list file.

 - NixOS#426687 (comment)

Then, in NixOS#437310, merged a few days later, another new module was added
with M0ustach3 as a maintainer. At the very least, an attempt was made
in de66c73 to add the maintainer to the
list, but an unfortunate typo (or two?) in the maintainers list entry
means the two intended usage of the new entry still don't work.

The issue here is not from the contributors. The reviewers and
committers could have done better, but it's not even truly their fault.
The issue is the meta information in NixOS modules was never checked. In
any way AFAICT. Otherwise this would have been caught immediately, and
not four months later.

Anyway, the intent clearly is that the entry should matche the GitHub
username.

(cherry picked from commit 43eca5c)
philiptaron pushed a commit that referenced this pull request Jan 27, 2026
Two different PRs, two different issues.

The first PR, chronologically-merged-in, #426687 introduced a new
module, and while reviewers “reviewed” the `meta.maintainers` entry,
they did not notice the maintainer was not in the maintainers list file.

 - #426687 (comment)

Then, in #437310, merged a few days later, another new module was added
with M0ustach3 as a maintainer. At the very least, an attempt was made
in de66c73 to add the maintainer to the
list, but an unfortunate typo (or two?) in the maintainers list entry
means the two intended usage of the new entry still don't work.

The issue here is not from the contributors. The reviewers and
committers could have done better, but it's not even truly their fault.
The issue is the meta information in NixOS modules was never checked. In
any way AFAICT. Otherwise this would have been caught immediately, and
not four months later.

Anyway, the intent clearly is that the entry should matche the GitHub
username.

(cherry picked from commit 43eca5c)
Gigahawk pushed a commit to Gigahawk/nixpkgs that referenced this pull request Jan 30, 2026
Two different PRs, two different issues.

The first PR, chronologically-merged-in, NixOS#426687 introduced a new
module, and while reviewers “reviewed” the `meta.maintainers` entry,
they did not notice the maintainer was not in the maintainers list file.

 - NixOS#426687 (comment)

Then, in NixOS#437310, merged a few days later, another new module was added
with M0ustach3 as a maintainer. At the very least, an attempt was made
in de66c73 to add the maintainer to the
list, but an unfortunate typo (or two?) in the maintainers list entry
means the two intended usage of the new entry still don't work.

The issue here is not from the contributors. The reviewers and
committers could have done better, but it's not even truly their fault.
The issue is the meta information in NixOS modules was never checked. In
any way AFAICT. Otherwise this would have been caught immediately, and
not four months later.

Anyway, the intent clearly is that the entry should matche the GitHub
username.
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 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/` 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants