2024-03-23 13:27:10 +08:00
|
|
|
inputs:
|
|
|
|
{
|
2024-08-03 17:40:11 +08:00
|
|
|
options.nixos.packages.vasp = let inherit (inputs.lib) mkOption types; in mkOption
|
2024-03-23 13:27:10 +08:00
|
|
|
{
|
2024-08-03 17:40:11 +08:00
|
|
|
type = types.nullOr (types.submodule {});
|
|
|
|
default = if inputs.config.nixos.system.gui.enable then {} else null;
|
|
|
|
};
|
|
|
|
# TODO: add more options to correctly configure VASP
|
|
|
|
config = let inherit (inputs.config.nixos.packages) vasp; in inputs.lib.mkIf (vasp != null)
|
|
|
|
{
|
2024-09-15 18:42:02 +08:00
|
|
|
nixos.packages.packages._packages = (with inputs.pkgs.localPackages.vasp; [ intel vtstscripts ])
|
|
|
|
++ (with inputs.pkgs.localPackages; [ py4vasp vaspkit ])
|
|
|
|
++ (inputs.lib.optional
|
|
|
|
(let inherit (inputs.config.nixos.system.nixpkgs) cuda; in cuda.enable && cuda.capabilities != null)
|
|
|
|
inputs.pkgs.localPackages.vasp.nvidia);
|
2024-03-23 13:27:10 +08:00
|
|
|
};
|
|
|
|
}
|