Attendees: @eveeifyeve @roberth, @artemist, @kiara, @aanderse
-
@eveeifyeve: Should we create a team?
-
@roberth: Yes, and I can do it. But we need a name.
- @roberth: Not sure if package modules is exactly the right name. We have three concepts that are quite distinct, and two give rise to the name “package module”
- derivation
- package (attrset)
- package runtime configuration
- @roberth: Maybe the formal name should be “package usage module” or “package runtime module”, but then informally we’d still call them package modules
- @roberth: Or should we rename them to “runtime modules” - short, distinct and meaningful
- @eveeifyeve: I am not really sure about the naming probably best to ask in a future meeting.
- @roberth: agreed
- @roberth: Not sure if package modules is exactly the right name. We have three concepts that are quite distinct, and two give rise to the name “package module”
-
@eveeifyeve: It would be good to have a followup review from @aanderse to do the following touches as I have responded to previous review.
- @roberth: Would be good to make the meaning of the
nullvalues completely explicit. Kind of like Hyrum’s law, every detail will be depended on, so we should avoid any ambiguities about it. - @roberth: My guess for
reloadSignalwould be thatnullmeans never send a signal. Otherwise that’s not representable. Leaving the choice of signal to the service manager would be a bit chaotic. Would be good to have @aaronanderse input on this. - @roberth: For
reloadCommand, similar. If both are unset, the service does not support reloading. Should a service manager fall back to restarts or just leave the old service running? This should become an option. Could postpone - not in this PR. - @eveeifyeve: Agreed, It would be great to have @aaronanderse input, as I am not sure.
- @roberth: Would be good to make the meaning of the
-
@eveeifyeve: Progress on the
process.environmentpr, as it would be useful for the database modular services flake I am creating. -
@eveeifyeve: Would it be good to have a wrapper function for making search.nixos.org backend responsible for combining the NixOS and service option that wraps the ability to define the modular services, disable the docs and options?
- @roberth: @Ericson2314 did some initial work on this in nixos/redlib: Make into modular service by Ericson2314 · Pull Request #475372 · NixOS/nixpkgs · GitHub
- Uses
mkAliasOptionModule - Probably adversely affects documentation
- Uses
- @roberth: @Ericson2314 did some initial work on this in nixos/redlib: Make into modular service by Ericson2314 · Pull Request #475372 · NixOS/nixpkgs · GitHub
-
@eveeifyeve: Wondering how the progress on adding Modular Services to nixbsd, as I have made a review regarding testing as there was a merged pr regarding testing modular services and I was wondering if there is more help needed.
- @roberth: I noticed NixBSD switched their
classtonixos, which is interesting. Not what I imagine, but if they can pull off decent NixOS option compatibility, that’s great! - @artemist joins (by great coincidence)
- @artemist: …
- @artemist: What would be possible to move in tree into nixpkgs?
- @artemist: e.g. could we put a core freebsd service configuration in
pkgs/os-specific/bsd- Would still rely on option definitions in external repo
- @artemist: Modular services helps add new content to NixBSD, but was never designed to ease the maintinence burden
- @artemist: a “Maximum Modular Services” would involve splitting services into a modular part and a non-modular part, e.g. sshd service and config in modular services, pam outside.
- @artemist: I think the biggest issue is the modules in nixpkgs.
- @robeth: We already have some nixos extentions already, e.g. you can query
options?systemdand then let your module do more. - @artemist: The problem would be the hack usage of tmpfiles.
- @roberth: tmpfiles usage in NixOS is a bit weird. I feel like we could do better
- @artemist: e.g. could we put a core freebsd service configuration in
- @artemist: NixBSD could implement VM tests for
testers.modularServiceCompliance - @eveeifyeve: Could be nice to have Darwin VMs in the future, but would be unfree
- @artemist: Only 2 VMs at a time limit. Windows has no limit for 11 Pro and higher-end Server
- @eveeifyeve: Many proejcts have separate module systems (e.g. NixOS, NixBSD, new nix-windows which I am working on), keeping compatibility is challenging
- @artemist: NixBSD borrows modules directly from NixOS, but that creates its own challenges
- @artemist: The Maximum Modular Services idea would be interesting to try out
- @roberth: Global modules are inherently different than composable ones, could split on that ground, perhaps in different files
- Globalness is a
_classthing. Splitting into file could be a different or combined solution strategy
- Globalness is a
- @artemist: Multiple files could be good, makes it easier to import into NixBSD and future configuration systems
- @roberth: Could also keep everything in
_class = "nixos"system-level, but split system by file - @roberth: Could also use mix-ins and have different OSes define their own mapping to their system config, e.g. nixpkgs/nixos/modules/system/service/systemd/system.nix at c76669e14e57cc9236097e862aff8f1d0e25ecf0 · NixOS/nixpkgs · GitHub
- @artemist: Try out a few approaches, see what works
- @roberth: Global modules are inherently different than composable ones, could split on that ground, perhaps in different files
- Some discussion about config portability
- @roberth: Translating upstream systemd units is not entirely impossible, but would be complex. I think our current course for portability is good
- @artemist left
- @KiaraGrouwstra joins
- @KiaraGrouwstra: I have architectural concerns about
notificationProtocol, as it has details for arbitrary service managers whereaslibshould be agnostic - @roberth: Could use extensible
enumpattern - @eveeifyeve: It should be a list
- @roberth: It’s needed by the systemd logic because systemd needs to know whether to expect a response from the service.
- @roberth: Backtracking on extensible enum because it makes service definitions unnecessarily hard because it would have to add conditionals not to “offend” the service manager with unknown values.
- We reached the decision to allow this enum, which models a service property that’s largely independent of service manager implementation. (Protocols are a “small waist” even if it’s multiple ones)
- *@aanderse joined
- we caught up on the reloading PR, which is close to done
- @roberth: I noticed NixBSD switched their
-
Followup:
- Mention the distincintion about Package Modules.
- @aanderse Followup with a review on lib/services: add some generalization options by Eveeifyeve · Pull Request #535695 · NixOS/nixpkgs · GitHub