-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Q: How can i make a module that creates a file without depending on systemd? #129646
Comments
The question is vague an I am not sure if this is exactly what you are asking, but perhaps you would like to:
It's unclear to me whether that'll satisfy your requirement of "without depending on systemd", as I don't really know what that means. NixOS modules typically require running on NixOS, and NixOS uses systemd to boot. So while defining a file on the file system using |
I was given an example using
Yes, the end-goal is for bind, but i would like it flexible for other DNS servers in case e.g. unbound becames usable. (so with no hard dependency on bind)
That seems to only create files in
Would like to make it flexible so that it could be used on NixOS forks e.g. NixNG which attempts to use OpenRC thus me wanting to use something else then --
-- |
I am not familar myself with OpenRC or NixNG, but I would imagine that it would probably be in NixNG's domain then to suggest some functionality how to procedurally generate files in not-immutable locations, like Given that Nix projects around integrating alternative init systems are reasonably young and new, I think there won't be an obvious generic way that's best for all of them yet. However, I think you'll be on a good path of generating your desired zonefile content with Also consider whether |
Ideally i want it imutable by default stored in the nix-store and with mutable on demand stored in some mutable location. O.o CC the maintainer of NixNG @MagicRB for opinion on the systemd-independendence |
First off, if you're writing a module for NixOS, unless you basically want to stuff NixNG into NixOS, you'll have to depend on systemd. NixOS stands and falls on systemd. Also, yes you want to put it in |
@MagicRB i was thinking more like using |
|
For a purely declarative file, the store or If you want something imperative, you'll have to answer the question of "when" and that answer will very likely involve the init system. We don't have an abstraction for init systems at this time.
@MagicRB The module system supports patterns that would allow common modules to be shared between the two. Something along the lines of NixOS/rfcs#78 (comment), where service abstractionSo splitting services into common and systemd modules is already a possibility and I have already done so to simplify maintenance between NixOS and nix-darwin, which is mostly just another init system too. |
I marked this as stale due to inactivity. → More info |
Closing since it sounds like the question was answered and this doesn't seem to be actionable, but I'm happy to reopen if I'm mistaken. |
Context: I am trying to make a module to manage a zonefiles for https://git.dotya.ml/RiXotStudio/system-management/, i don't have experience with nix so doing babysteps to get there.
So far i've made: http://ix.io/3sih
The text was updated successfully, but these errors were encountered: