File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 5757 ./modules/etc.nix
5858 ./modules/framework.nix
5959 ./modules/hosts.nix
60+ ./modules/security-pki.nix
6061 ./modules/kernel.nix
6162 ./modules/microg.nix
6263 ./modules/pixel
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2022 Daniel Fullmer and robotnix contributors
2+ # SPDX-License-Identifier: MIT
3+
4+ { config , pkgs , lib , ... } :
5+
6+ let
7+ inherit ( lib ) mkIf mkOption types ;
8+ in
9+ {
10+ options = {
11+ security . pki . certificateFiles = mkOption {
12+ default = [ ] ;
13+ type = types . listOf types . path ;
14+ description = "A list of files containing trusted root certificates in PEM format. These are added as system-level trust anchors." ;
15+ } ;
16+ } ;
17+
18+ config = mkIf ( config . security . pki . certificateFiles != [ ] ) {
19+ source . dirs . "system/ca-certificates" . postPatch = lib . concatMapStringsSep "\n " ( certFile : ''
20+ cp -v ${ lib . escapeShellArg "${ certFile } " } $out/files/$(${ pkgs . openssl } /bin/openssl x509 -inform PEM -subject_hash_old -in ${ lib . escapeShellArg "${ certFile } " } -noout).0
21+ '' ) config . security . pki . certificateFiles ;
22+ } ;
23+ }
You can’t perform that action at this time.
0 commit comments