modules.services.lumericalLicenseManager: do not create fake interface

This commit is contained in:
2025-09-06 19:36:23 +08:00
parent 4028dc1d56
commit b211e84d01
3 changed files with 9 additions and 18 deletions

View File

@@ -28,6 +28,7 @@ inputs:
ollama = {};
sshd = { groupBanner = true; motd = true; };
speedtest = {};
lumericalLicenseManager.macAddress = "70:20:84:09:a3:52";
};
};
};

View File

@@ -15,7 +15,11 @@ inputs:
};
fileSystems.swap = [ "/nix/swap/swap" ];
};
services.beesd."/".hashTableSizeMB = 64;
services =
{
beesd."/".hashTableSizeMB = 64;
lumericalLicenseManager.macAddress = "04:42:1a:26:0c:07";
};
};
services.hardware.bolt.enable = true;
};

View File

@@ -4,12 +4,7 @@ inputs:
{
type = types.nullOr (types.submodule { options =
{
macAddress = mkOption
{
type = types.str;
default = if inputs.config.nixos.system.network != null then "00:01:23:45:67:89" else null;
};
createFakeInterface = mkOption { type = types.bool; default = inputs.config.nixos.system.network != null; };
macAddress = mkOption { type = types.str; };
autoStart = mkOption { type = types.bool; default = true; };
};});
default = null;
@@ -28,16 +23,7 @@ inputs:
in [ "${license}:/home/ansys_inc/shared_files/licensing/license_files/ansyslmd.lic" ];
};
nixos.services.podman = {};
systemd =
{
network = inputs.lib.mkIf lumericalLicenseManager.createFakeInterface
{
netdevs.ensFakeLumerical.netdevConfig = { Kind = "dummy"; Name = "ens10"; };
networks."10-ens10" =
{ matchConfig.Name = "ens10"; linkConfig.MACAddress = lumericalLicenseManager.macAddress; };
};
services.podman-lumericalLicenseManager.wantedBy =
inputs.lib.mkIf (!lumericalLicenseManager.autoStart) (inputs.lib.mkForce []);
};
systemd.services.podman-lumericalLicenseManager.wantedBy =
inputs.lib.mkIf (!lumericalLicenseManager.autoStart) (inputs.lib.mkForce []);
};
}