mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
modules.services.lumericalLicenseManager: allow set macAddress
This commit is contained in:
@@ -103,7 +103,7 @@ inputs:
|
||||
podman = {};
|
||||
ananicy = {};
|
||||
keyd = {};
|
||||
lumericalLicenseManager = {};
|
||||
lumericalLicenseManager.macAddress = "745d22c7d297";
|
||||
searx = {};
|
||||
kvm.aarch64 = true;
|
||||
nspawn = [ "arch" "ubuntu-22.04" "fedora" ];
|
||||
|
||||
@@ -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 = {};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user