feat: use nixsgxLib.mkSGXContainer

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
Harald Hoyer 2024-07-01 16:33:00 +02:00
parent 4e5083def9
commit 943ef8c878
Signed by: harald
GPG key ID: F519A1143B3FBE32
5 changed files with 22 additions and 36 deletions

18
flake.lock generated
View file

@ -165,11 +165,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1717281328, "lastModified": 1719707984,
"narHash": "sha256-evZPzpf59oNcDUXxh2GHcxHkTEG4fjae2ytWP85jXRo=", "narHash": "sha256-RoxIr/fbndtuKqulGvNCcuzC6KdAib85Q8gXnjzA1dw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b3b2b28c1daa04fe2ae47c21bb76fd226eac4ca1", "rev": "7dca15289a1c2990efbe4680f0923ce14139b042",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -201,11 +201,11 @@
"snowfall-lib": "snowfall-lib" "snowfall-lib": "snowfall-lib"
}, },
"locked": { "locked": {
"lastModified": 1718699802, "lastModified": 1719845153,
"narHash": "sha256-1Q+xMLgggLj2W/u8M1zJeqqGMDRoEjIeve12Jt4EAXM=", "narHash": "sha256-i2S/3JenGdtUFublhYSnfoUGcvIyngUBlF3l3XKsn08=",
"owner": "matter-labs", "owner": "matter-labs",
"repo": "nixsgx", "repo": "nixsgx",
"rev": "d9eb744741368eb13fc2247cb3603551828d623f", "rev": "07ae787761c3c7195d743f16d18071daf5f49dfd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -281,11 +281,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716675292, "lastModified": 1719005984,
"narHash": "sha256-7TFvVE4HR/b65/0AAhewYHEJzUXxIEJn82ow5bCkrDo=", "narHash": "sha256-mpFl3Jv4fKnn+5znYXG6SsBjfXHJdRG5FEqNSPx0GLA=",
"owner": "snowfallorg", "owner": "snowfallorg",
"repo": "lib", "repo": "lib",
"rev": "5d6e9f235735393c28e1145bec919610b172a20f", "rev": "c6238c83de101729c5de3a29586ba166a9a65622",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,15 +1,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Matter Labs # Copyright (c) 2024 Matter Labs
{ lib { teepot
, pkgs , nixsgxLib
, inputs
, teepot
, nixsgx
, container-name ? "teepot-self-attestation-test-sgx-azure" , container-name ? "teepot-self-attestation-test-sgx-azure"
, tag ? null , tag ? null
, isAzure ? true , isAzure ? true
}: }:
pkgs.callPackage inputs.nixsgx-flake.lib.mkSGXContainer { nixsgxLib.mkSGXContainer {
name = container-name; name = container-name;
inherit tag; inherit tag;

View file

@ -1,15 +1,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Matter Labs # Copyright (c) 2024 Matter Labs
{ lib { teepot
, pkgs , nixsgxLib
, inputs
, teepot
, nixsgx
, container-name ? "teepot-vault-admin-sgx-azure" , container-name ? "teepot-vault-admin-sgx-azure"
, tag ? null , tag ? null
, isAzure ? null , isAzure ? null
}: }:
pkgs.callPackage inputs.nixsgx-flake.lib.mkSGXContainer { nixsgxLib.mkSGXContainer {
name = container-name; name = container-name;
inherit tag; inherit tag;

View file

@ -1,10 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Matter Labs # Copyright (c) 2024 Matter Labs
{ lib { teepot
, pkgs , nixsgxLib
, inputs
, teepot
, nixsgx
, vat , vat
, vault , vault
, container-name ? "teepot-vault-sgx-azure" , container-name ? "teepot-vault-sgx-azure"
@ -15,7 +12,7 @@ let
entrypoint = "${teepot.teepot.tee_ratls_preexec}/bin/tee-ratls-preexec"; entrypoint = "${teepot.teepot.tee_ratls_preexec}/bin/tee-ratls-preexec";
appDir = "/opt/vault"; appDir = "/opt/vault";
in in
pkgs.callPackage inputs.nixsgx-flake.lib.mkSGXContainer { nixsgxLib.mkSGXContainer {
name = container-name; name = container-name;
inherit tag; inherit tag;
inherit appDir; inherit appDir;

View file

@ -1,18 +1,15 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Matter Labs # Copyright (c) 2024 Matter Labs
{ lib { teepot
, pkgs , nixsgxLib
, inputs
, teepot
, nixsgx
, vat , vat
, container-name ? "teepot-vault-unseal-sgx-azure" , container-name ? "teepot-vault-unseal-sgx-azure"
, tag ? null , tag ? null
, isAzure ? true , isAzure ? true
}: }:
pkgs.callPackage inputs.nixsgx-flake.lib.mkSGXContainer { nixsgxLib.mkSGXContainer {
name = container-name; name = container-name;
inherit tag; inherit tag isAzure;
packages = [ packages = [
vat.vault-auth-tee.sha vat.vault-auth-tee.sha
@ -20,8 +17,6 @@ pkgs.callPackage inputs.nixsgx-flake.lib.mkSGXContainer {
]; ];
entrypoint = "${teepot.teepot.tee_vault_unseal}/bin/tee-vault-unseal"; entrypoint = "${teepot.teepot.tee_vault_unseal}/bin/tee-vault-unseal";
isAzure = true;
manifest = { manifest = {
loader = { loader = {
log_level = "error"; log_level = "error";