Closed cowboyai closed 2 days ago
Duplicate of https://github.com/cachix/devenv/issues/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.
Link to NixOS RFC: https://github.com/NixOS/rfcs/pull/163
This can't work :)
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 todevenv
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 typicalconfiguration.nix
, this is a single line. However, withdevenv
, it appears I need to write a custom module that essentially duplicates what's already available innixpkgs
forservices.pcscd
. I've been looking at/devenv/src/modules/services
, and it seems like services indevenv.nix
are limited to "supported" services and don't integrate withnixosConfiguration.<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!