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

Add a setting for configuring the SSL certificates file #8062

Merged
merged 2 commits into from
Mar 27, 2023

Conversation

edolstra
Copy link
Member

Motivation

This provides a platform-independent way to configure the SSL certificates file in the Nix daemon. Previously we provided instructions for overriding the environment variable in launchd, but that obviously doesn't work with systemd. Now we can just tell users to add

ssl-cert-file = /etc/ssl/my-certificate-bundle.crt

to their nix.conf.

Context

DeterminateSystems/nix-installer#289

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

This provides a platform-independent way to configure the SSL
certificates file in the Nix daemon. Previously we provided
instructions for overriding the environment variable in launchd, but
that obviously doesn't work with systemd. Now we can just tell users
to add

  ssl-cert-file = /etc/ssl/my-certificate-bundle.crt

to their nix.conf.
@edolstra edolstra enabled auto-merge March 27, 2023 12:09
@edolstra edolstra merged commit 5a0f5b5 into NixOS:master Mar 27, 2023
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-installer-workgroup/21495/20

@patryk4815
Copy link

@edolstra Can we add /etc/ssl/certs/ca-bundle.crt to this list?
This would help to use "nix" easily without adjusting the parameters.
ca-bundle.crt is commonly used in centos, almalinux, rockylinux, fedora

Path Settings::getDefaultSSLCertFile()
{
    for (auto & fn : {"/etc/ssl/certs/ca-certificates.crt", "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"})
        if (pathExists(fn)) return fn;
    return "";
}

@fricklerhandwerk
Copy link
Contributor

@patryk4815 it will be easier for the Nix team to track that if you open an issue, or even better make a pull request directly. Such a comment will easily slip through the cracks because the PR is closed and thus off the radar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants