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 + ]; + } + ] + ); }