diff --git a/devices/pc/default.nix b/devices/pc/default.nix index d17469bc..14ed5186 100644 --- a/devices/pc/default.nix +++ b/devices/pc/default.nix @@ -103,7 +103,7 @@ inputs: podman = {}; ananicy = {}; keyd = {}; - lumericalLicenseManager = {}; + lumericalLicenseManager.macAddress = "745d22c7d297"; searx = {}; kvm.aarch64 = true; nspawn = [ "arch" "ubuntu-22.04" "fedora" ]; diff --git a/modules/services/lumericalLicenseManager/default.nix b/modules/services/lumericalLicenseManager/default.nix index 47d98209..e1bfd9ff 100644 --- a/modules/services/lumericalLicenseManager/default.nix +++ b/modules/services/lumericalLicenseManager/default.nix @@ -1,7 +1,13 @@ inputs: { options.nixos.services.lumericalLicenseManager = let inherit (inputs.lib) mkOption types; in mkOption - { type = types.nullOr (types.submodule {}); default = null; }; + { + type = types.nullOr (types.submodule { options = + { + macAddress = mkOption { type = types.str; }; + };}); + default = null; + }; config = let inherit (inputs.config.nixos.services) lumericalLicenseManager; in inputs.lib.mkIf (lumericalLicenseManager != null) { @@ -9,6 +15,10 @@ inputs: { inherit (inputs.topInputs.self.src.lumerical.licenseManager) image imageFile; extraOptions = [ "--network=host" ]; + volumes = + let license = inputs.pkgs.localPackages.lumerical.license.override + { inherit (lumericalLicenseManager) macAddress; }; + in [ "${license}:/home/ansys_inc/shared_files/licensing/license_files/ansyslmd.lic" ]; }; nixos.services.podman = {}; };