From 94d0ada2233c10d28f5b3abc9b3eb994aa274870 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 20 Mar 2024 00:07:00 +0100 Subject: [PATCH] nixsgx for everyone Signed-off-by: Harald Hoyer --- modules/nixos/nix/default.nix | 7 +++++-- systems/x86_64-linux/sgx-nixos/default.nix | 1 - systems/x86_64-linux/sgx/default.nix | 1 - systems/x86_64-linux/t15/default.nix | 1 - systems/x86_64-linux/x1/default.nix | 1 - 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index 76c4299..1211345 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -48,6 +48,9 @@ in let users = [ "root" config.plusultra.user.name ] ++ optional config.services.hydra.enable "hydra"; + extra-substituters = cfg.extra-substituters // { + "https://nixsgx.cachix.org".key = "nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE="; + }; in { package = cfg.package; @@ -65,11 +68,11 @@ in substituters = [ cfg.default-substituter.url ] ++ - (mapAttrsToList (name: value: name) cfg.extra-substituters); + (mapAttrsToList (name: value: name) extra-substituters); trusted-public-keys = [ cfg.default-substituter.key ] ++ - (mapAttrsToList (name: value: value.key) cfg.extra-substituters); + (mapAttrsToList (name: value: value.key) extra-substituters); } // (lib.optionalAttrs config.plusultra.tools.direnv.enable { keep-outputs = true; diff --git a/systems/x86_64-linux/sgx-nixos/default.nix b/systems/x86_64-linux/sgx-nixos/default.nix index 8de991d..64ce7d5 100644 --- a/systems/x86_64-linux/sgx-nixos/default.nix +++ b/systems/x86_64-linux/sgx-nixos/default.nix @@ -8,7 +8,6 @@ with lib.plusultra; base.enable = true; nix-ld.enable = true; nix.enable = true; - nix.extra-substituters."https://nixsgx.cachix.org".key = "nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE="; user.extraGroups = [ "docker" "sgx" ]; }; diff --git a/systems/x86_64-linux/sgx/default.nix b/systems/x86_64-linux/sgx/default.nix index 6357a5d..17b00b6 100644 --- a/systems/x86_64-linux/sgx/default.nix +++ b/systems/x86_64-linux/sgx/default.nix @@ -14,7 +14,6 @@ in 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; diff --git a/systems/x86_64-linux/t15/default.nix b/systems/x86_64-linux/t15/default.nix index 82f46ae..6046a61 100644 --- a/systems/x86_64-linux/t15/default.nix +++ b/systems/x86_64-linux/t15/default.nix @@ -7,7 +7,6 @@ gui.enable = true; nix-ld.enable = true; nix.enable = true; - nix.extra-substituters."https://nixsgx.cachix.org".key = "nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE="; podman.enable = true; secureboot.enable = true; }; diff --git a/systems/x86_64-linux/x1/default.nix b/systems/x86_64-linux/x1/default.nix index 4c2616c..f9a19d8 100644 --- a/systems/x86_64-linux/x1/default.nix +++ b/systems/x86_64-linux/x1/default.nix @@ -9,7 +9,6 @@ with lib.plusultra; gui.enable = true; nix-ld.enable = true; nix.enable = true; - nix.extra-substituters."https://nixsgx.cachix.org".key = "nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE="; podman.enable = true; secureboot.enable = true; };