mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 07:29:23 +08:00
modules.services.lumericalLicenseManager: do not create fake interface
This commit is contained in:
@@ -28,6 +28,7 @@ inputs:
|
||||
ollama = {};
|
||||
sshd = { groupBanner = true; motd = true; };
|
||||
speedtest = {};
|
||||
lumericalLicenseManager.macAddress = "70:20:84:09:a3:52";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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 []);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user