From 6424129da381eb9b60199ef1d9dce803f9ae251d Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 23 Jan 2025 21:41:08 -0500 Subject: [PATCH] Do not install wasm role on neelix. --- nix/configuration/hosts/odo/default.nix | 1 + nix/configuration/roles/wasm/default.nix | 25 +++++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index 87ba9cc..c3d262d 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -55,4 +55,5 @@ me.terraform.enable = true; me.vnc_client.enable = true; me.vscode.enable = true; + me.wasm.enable = true; } diff --git a/nix/configuration/roles/wasm/default.nix b/nix/configuration/roles/wasm/default.nix index 67fe31b..f564ec8 100644 --- a/nix/configuration/roles/wasm/default.nix +++ b/nix/configuration/roles/wasm/default.nix @@ -8,9 +8,24 @@ { imports = [ ]; - environment.systemPackages = with pkgs; [ - wabt - wasm-bindgen-cli - binaryen # for wasm-opt - ]; + options.me = { + wasm.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install wasm."; + }; + }; + + config = lib.mkIf config.me.wasm.enable ( + lib.mkMerge [ + { + environment.systemPackages = with pkgs; [ + wabt + wasm-bindgen-cli + binaryen # for wasm-opt + ]; + } + ] + ); }