2024-03-06 16:07:40 +01:00
|
|
|
{ pkgs, lib, config, ... }:
|
2024-03-06 11:00:56 +01:00
|
|
|
with lib;
|
|
|
|
with lib.plusultra;
|
|
|
|
{
|
2024-03-06 15:36:02 +01:00
|
|
|
imports = [ ./hardware-configuration.nix ];
|
2024-03-06 11:00:56 +01:00
|
|
|
|
2024-03-06 19:37:12 +01:00
|
|
|
sops.secrets.pccs.sopsFile = ../../../.secrets/sgx/pccs.yaml;
|
|
|
|
|
2024-03-06 15:36:02 +01:00
|
|
|
plusultra = {
|
|
|
|
base.enable = true;
|
|
|
|
gui.enable = false;
|
|
|
|
nix-ld.enable = true;
|
|
|
|
nix.enable = true;
|
|
|
|
nix.extra-substituters."https://nixsgx.cachix.org".key = "nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE=";
|
|
|
|
pccs.enable = true;
|
|
|
|
pccs.secret = config.sops.secrets.pccs.path;
|
|
|
|
podman.enable = true;
|
|
|
|
secureboot.enable = true;
|
2024-03-08 12:35:42 +01:00
|
|
|
user.extraGroups = [ "docker" "sgx" ];
|
2024-03-06 15:36:02 +01:00
|
|
|
};
|
2024-03-06 11:00:56 +01:00
|
|
|
|
2024-03-08 14:10:25 +01:00
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
virtualisation.podman.dockerCompat = false;
|
2024-03-12 00:24:28 +01:00
|
|
|
|
2024-03-06 11:00:56 +01:00
|
|
|
system.autoUpgrade = {
|
|
|
|
enable = true;
|
|
|
|
operation = "boot";
|
2024-03-06 12:25:15 +01:00
|
|
|
allowReboot = true;
|
2024-03-06 11:00:56 +01:00
|
|
|
};
|
|
|
|
|
2024-03-06 15:36:02 +01:00
|
|
|
security.tpm2.enable = false;
|
|
|
|
security.tpm2.abrmd.enable = false;
|
|
|
|
|
2024-03-06 12:31:17 +01:00
|
|
|
networking.wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
|
|
|
|
2024-03-08 14:10:25 +01:00
|
|
|
# services.aesmd.enable = true;
|
2024-03-06 15:12:04 +01:00
|
|
|
|
2024-03-06 11:00:56 +01:00
|
|
|
powerManagement.cpuFreqGovernor = "ondemand";
|
|
|
|
|
|
|
|
system.stateVersion = "23.11";
|
2024-03-08 12:58:27 +01:00
|
|
|
|
|
|
|
environment.etc."sgx_default_qcnl.conf".text = ''
|
|
|
|
{
|
|
|
|
"pccs_url": "https://127.0.0.1:8081/sgx/certification/v4/",
|
|
|
|
"use_secure_cert": false,
|
|
|
|
"collateral_service": "https://api.trustedservices.intel.com/sgx/certification/v4/",
|
|
|
|
"retry_times": 6,
|
|
|
|
"retry_delay": 10,
|
|
|
|
"pck_cache_expire_hours": 168,
|
|
|
|
"verify_collateral_cache_expire_hours": 168,
|
|
|
|
"local_cache_only": false
|
|
|
|
}
|
|
|
|
'';
|
2024-03-06 11:00:56 +01:00
|
|
|
}
|