modules.services.lumericalLicenseManager: allow set macAddress

This commit is contained in:
2025-06-24 21:19:52 +08:00
parent 86495bb56f
commit efa024f0ae
2 changed files with 12 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ inputs:
podman = {};
ananicy = {};
keyd = {};
lumericalLicenseManager = {};
lumericalLicenseManager.macAddress = "745d22c7d297";
searx = {};
kvm.aarch64 = true;
nspawn = [ "arch" "ubuntu-22.04" "fedora" ];

View File

@@ -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 = {};
};