mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 06:18:52 +08:00
17 lines
539 B
Nix
17 lines
539 B
Nix
|
inputs:
|
||
|
{
|
||
|
options.nixos.packages.mumax = let inherit (inputs.lib) mkOption types; in mkOption
|
||
|
{
|
||
|
type = types.nullOr (types.submodule {});
|
||
|
default =
|
||
|
if inputs.config.nixos.system.gui.enable
|
||
|
&& (let inherit (inputs.config.nixos.system.nixpkgs) cuda; in cuda.enable && cuda.capabilities != null)
|
||
|
then {}
|
||
|
else null;
|
||
|
};
|
||
|
config = let inherit (inputs.config.nixos.packages) mumax; in inputs.lib.mkIf (mumax != null)
|
||
|
{
|
||
|
nixos.packages.packages._packages = [ inputs.pkgs.localPackages.mumax ];
|
||
|
};
|
||
|
}
|