Skip to content

ntpd-rs: projects-old -> projects#832

Merged
eljamm merged 2 commits into
ngi-nix:mainfrom
themadbit:move-projects
Apr 17, 2025
Merged

ntpd-rs: projects-old -> projects#832
eljamm merged 2 commits into
ngi-nix:mainfrom
themadbit:move-projects

Conversation

@themadbit
Copy link
Copy Markdown
Contributor

Closes #738

@themadbit themadbit force-pushed the move-projects branch 4 times, most recently from d9db855 to bb8d697 Compare April 16, 2025 14:05
@themadbit themadbit marked this pull request as ready for review April 16, 2025 14:14
Comment thread projects/ntpd-rs/default.nix Outdated
examples.basic = {
module = ./services/ntpd-rs/examples/basic.nix;
description = ''
Example config for ntpd-rs options is available in tests.
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.

This is more of a comment than a description, right? You're saying that we should have the configuration in the tests as a standalone example, in the future.

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.

Not quite. I saw no need to rewrite examples, as the test expression shows how to use all options as made in the module.

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.

In this case, we can set the example to null and just have the test be in nixos.tests. What do you think?

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.

Yes, that is more ideal. I did attempt module = null; but I got errors like:

{
         description = ''
           Example config for ntpd-rs options is available in tests.
         '';
         module = null;
         tests = {
           ntpd-rs = "/nix/store/dn9smqqg60pn1a3c1sk2m0m8iakm84zs-source/nixos/tests/ntpd-rs.nix";
         };
       }: expected type option<example>, but value does not conform to 'example': expected 'example'-struct, but found:
       missing required either<path, string>[absolute path] field 'module'

Was my declaration incorrect?

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.

Each service must have an example and each example must have a module, but examples themselves can be null to signify that they're needed, but not available. In this case, you need examples.basic = null;

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.

aaah, got that. Let me commit something, and you have a look

Comment thread projects/ntpd-rs/default.nix
Copy link
Copy Markdown
Contributor

@eljamm eljamm left a comment

Choose a reason for hiding this comment

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

LGTM

@eljamm eljamm merged commit 10dfb1f into ngi-nix:main Apr 17, 2025
2 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Nix@NGI Apr 17, 2025
themadbit added a commit to themadbit/ngipkgs that referenced this pull request Apr 22, 2025
@themadbit themadbit deleted the move-projects branch July 2, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Migrate ntpd-rs from projects-old to projects

2 participants