Skip to content

nixos/redlib: Make into modular service - #475372

Open
Ericson2314 wants to merge 2 commits into
NixOS:masterfrom
Ericson2314:redlib-modular
Open

Ericson2314 wants to merge 2 commits into
NixOS:masterfrom
Ericson2314:redlib-modular

Conversation

@Ericson2314

Copy link
Copy Markdown
Member

Trying to understand what is needed to backwards-compatibly retrofit and existing NixOS module.

(I don't know anything about redlib in particular, I picked it basically at random.)

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 other 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: 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. 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/` 6.topic: module system About "NixOS" module system internals 6.topic: lib The Nixpkgs function library labels Dec 30, 2025
Comment thread pkgs/by-name/re/redlib/service.nix Resolved

@KiaraGrouwstra KiaraGrouwstra 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.

down the line, we might consider if modular services could offer semantic interfaces for our currently NixOS-specific parts, like openFirewall here, but given the PR scope here of sample service compat layer, I think this looks good.

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 31, 2025
Comment thread nixos/modules/services/misc/redlib.nix Resolved
Comment on lines +50 to +55
[
"package"
"address"
"port"
"settings"
];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tech debt / missing feature in module system: make this automatic when the path leads to an option tree instead of a single option.
(no action required here)

@Ericson2314
Ericson2314 marked this pull request as ready for review January 2, 2026 20:38
@Ericson2314

Copy link
Copy Markdown
Member Author

OK I think this is ready!

map
(
opt:
mkAliasOptionModule

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do these generated decls copy the docs? We should keep normal docs for the traditional style service.

This new function doesn't set a default value. This allows it to be used
with modular services which don't support a `pkgs` argument to the
module.

Could we mark this unstable? It might be nice to avoid instantly
stabilizing it as we experiment with modular services.
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 12, 2026
@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/modular-services-meeting-4-2026-07-10/78847/1

@KiaraGrouwstra KiaraGrouwstra added the 6.topic: package configuration modules Modular services / package configuration modules https://matrix.to/#/#modular-services:nixos.org label Jul 23, 2026
@KiaraGrouwstra KiaraGrouwstra moved this from Ready for review to In Progress in Modular Services / Package Configuration Modules Jul 23, 2026
@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/modular-services-meeting-5-2026-07-24/79145/1

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: lib The Nixpkgs function library 6.topic: module system About "NixOS" module system internals 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: package configuration modules Modular services / package configuration modules https://matrix.to/#/#modular-services:nixos.org 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants