sgx: factor out aesmd
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
parent
0b9fb35062
commit
f1899875ce
3 changed files with 45 additions and 13 deletions
30
modules/nixos/sgx/aesmd_dcap/default.nix
Normal file
30
modules/nixos/sgx/aesmd_dcap/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.metacfg;
|
||||
let
|
||||
cfg = config.metacfg.aesmd_dcap;
|
||||
in
|
||||
{
|
||||
options.metacfg.aesmd_dcap = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable aesmd in dcap mode.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
metacfg = {
|
||||
nix.extra-substituters = {
|
||||
"https://nixsgx.cachix.org".key = "nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE=";
|
||||
};
|
||||
};
|
||||
services.aesmd = {
|
||||
enable = true;
|
||||
quoteProviderLibrary = pkgs.nixsgx.sgx-dcap.default_qpl;
|
||||
};
|
||||
systemd.services.aesmd = {
|
||||
environment.LD_LIBRARY_PATH = lib.mkForce (lib.makeLibraryPath [ pkgs.nixsgx.sgx-dcap.default_qpl pkgs.curl.out ]);
|
||||
serviceConfig.BindReadOnlyPaths = [
|
||||
"/etc/sgx_default_qcnl.conf"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue