mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
ca: add certificates in /etc/ssl/certs
This commit is contained in:
parent
0a97cefe07
commit
36df7dac11
2 changed files with 38 additions and 0 deletions
37
modules/environment/ca.nix
Normal file
37
modules/environment/ca.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
certificate = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = {
|
||||
|
||||
environment.etc = {
|
||||
# NixOS canonical location + Debian/Ubuntu/Arch/Gentoo compatibility.
|
||||
"ssl/certs/ca-certificates.crt".source = certificate;
|
||||
|
||||
# Old NixOS compatibility.
|
||||
"ssl/certs/ca-bundle.crt".source = certificate;
|
||||
|
||||
# CentOS/Fedora compatibility.
|
||||
"pki/tls/certs/ca-bundle.crt".source = certificate;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
[
|
||||
./build/activation.nix
|
||||
./build/config.nix
|
||||
./environment/ca.nix
|
||||
./environment/etc
|
||||
./environment/links.nix
|
||||
./environment/login
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue