Skip to content
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

Generic Service Module (or custom service) #1581

Closed
cowboyai opened this issue Nov 10, 2024 · 3 comments
Closed

Generic Service Module (or custom service) #1581

cowboyai opened this issue Nov 10, 2024 · 3 comments
Labels
question Further information is requested

Comments

@cowboyai
Copy link

Question: Running Existing NixOS Services in Devenv - Is There a More Generic Way?

I've been using .direnv for a while, but I'm relatively new to devenv and exploring its capabilities for running services.

I'm trying to figure out if there's a more generic way to call into services and programs that are already present in NixOS through devenv.

Specifically, I'm interested in enabling services.pcscd. In a typical configuration.nix, this is a single line. However, with devenv, it appears I need to write a custom module that essentially duplicates what's already available in nixpkgs for services.pcscd. I've been looking at /devenv/src/modules/services, and it seems like services in devenv.nix are limited to "supported" services and don't integrate with nixosConfiguration.<name>.services but rather duplicate them(and fix bugs).

Am I missing something here? Is there an existing method to enable and run services without delving deeply into how direnv creates .devenv/profile? I'm competent in Rust and Nix but feel like I'm overlooking an existing solution or approach.

Any insights or guidance would be greatly appreciated!

@cowboyai cowboyai added the question Further information is requested label Nov 10, 2024
@sandydoo
Copy link
Member

Duplicate of #75?

There's no solution to this. Service modules are currently "duplicated" across NixOS, nix-darwin, home-manager, devenv, and so on. It would be great to eventually have an all-encompassing service spec, where we would have a unified service interface with different implementations for each environment. But, as you can imagine, this would require a colossal RFC and cooperation/compliance from all of the stakeholders.

@sandydoo
Copy link
Member

Link to NixOS RFC: NixOS/rfcs#163

@domenkozar
Copy link
Member

This can't work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants