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

fix: set override correctly for systemd services #48

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

aksiksi
Copy link
Owner

@aksiksi aksiksi commented Sep 23, 2024

Previously, I had used a priority of 500 thinking that the "default" is 1000. Turns out that Nix sets a priority of 100 to regular assigments. Since the oci-containers module sets Restart=always, it ends up silently overriding any value set by compose2nix.

To fix this, I am bumping down the priority to 90. I've also added an integration test to verify that we indeed override the NixOS module.

Fixes #46.

Previously, I had used a priority of 500 thinking that the "default" is 1000.
Turns out that Nix sets a priority of 100 to regular assigments. Since the
`oci-containers` module sets `Restart=always`, it ends up silently overriding
any value set by compose2nix.

To fix this, I am bumping down the priority to 90. I've also added an
integration test to verify that we indeed override the NixOS module.
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.08%. Comparing base (11cf608) to head (8729198).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #48   +/-   ##
=======================================
  Coverage   72.08%   72.08%           
=======================================
  Files           6        6           
  Lines         745      745           
=======================================
  Hits          537      537           
  Misses        165      165           
  Partials       43       43           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aksiksi aksiksi merged commit e52b338 into main Sep 23, 2024
6 checks passed
@aksiksi aksiksi deleted the fix-service-override branch September 23, 2024 21:20
aksiksi added a commit that referenced this pull request Sep 23, 2024
Previously, I had used a priority of 500 thinking that the "default" is 1000.
Turns out that Nix sets a priority of 100 to regular assigments. Since the
`oci-containers` module sets `Restart=always`, it ends up silently overriding
any value set by compose2nix.

To fix this, I am bumping down the priority to 90. I've also added an integration
test to verify that we indeed override the NixOS module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Priority of serviceConfig
1 participant