Hello NixOS Community,
I’m currently working on setting up a custom service in NixOS and would like some guidance on configuring it with environment variables.
Here’s what I’m trying to achieve:
- Service Definition: How do I define a custom service in my configuration.nix with specific environment variables?
- Environment Variables: What is the best way to pass environment variables to the service? Should they be included directly in the service definition or managed separately?
- Testing and Debugging: Are there any recommended practices for testing and debugging custom services to ensure they are picking up the environment variables correctly?
I also check this: https://discourse.nixos.org/t/home-manager-flake-and-configuration-how-to-rebuild-the-whole-environment-with-just-nixos-rebuild-switcsnowflake But I have not found any solution. Any tips, examples, or resources would be greatly appreciated. Thank you in advance for your assistance!
Best regards