2024-03-06 16:07:40 +01:00
|
|
|
{ pkgs, lib, config, ... }:
|
2024-03-06 11:00:56 +01:00
|
|
|
{
|
2024-03-21 09:12:32 +01:00
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
|
|
|
./fileserver.nix
|
|
|
|
./backup.nix
|
|
|
|
./network.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-19 14:46:44 +01:00
|
|
|
sops.secrets.backup-pw.sopsFile = ../../../.secrets/sgx/backup-s3.yaml;
|
2024-03-06 19:37:12 +01:00
|
|
|
|
2024-03-20 08:58:05 +01:00
|
|
|
metacfg = {
|
2024-03-06 15:36:02 +01:00
|
|
|
base.enable = true;
|
|
|
|
gui.enable = false;
|
|
|
|
nix-ld.enable = true;
|
|
|
|
nix.enable = true;
|
2024-03-20 16:53:28 +01:00
|
|
|
aesmd_dcap.enable = true;
|
2024-03-06 15:36:02 +01:00
|
|
|
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-21 09:12:32 +01:00
|
|
|
virtualisation = {
|
|
|
|
docker.enable = true;
|
|
|
|
libvirtd.enable = true;
|
|
|
|
podman.dockerCompat = false;
|
|
|
|
};
|
|
|
|
systemd.services.libvirt-guests.after = [ "network-online.target" ];
|
2024-03-12 00:24:28 +01:00
|
|
|
|
2024-03-06 11:00:56 +01:00
|
|
|
system.autoUpgrade = {
|
|
|
|
enable = true;
|
2024-03-20 08:50:51 +01:00
|
|
|
operation = "switch";
|
2024-03-06 12:25:15 +01:00
|
|
|
allowReboot = true;
|
2024-03-06 11:00:56 +01:00
|
|
|
};
|
|
|
|
|
2024-03-19 14:46:44 +01:00
|
|
|
services.pcscd.enable = true;
|
2024-03-06 15:12:04 +01:00
|
|
|
|
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-19 16:14:49 +01:00
|
|
|
|
2024-03-21 09:12:32 +01:00
|
|
|
system.stateVersion = "23.11";
|
2024-03-06 11:00:56 +01:00
|
|
|
}
|