mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:29:24 +08:00
modules.packages: split packages from minimal to server
This commit is contained in:
@@ -33,7 +33,7 @@ inputs:
|
||||
waifu2x-converter-cpp blender paraview vlc whalebird spotify obs-studio subtitlecomposer
|
||||
(inkscape-with-extensions.override { inkscapeExtensions = null; })
|
||||
# development
|
||||
adb-sync scrcpy dbeaver-bin cling aircrack-ng
|
||||
adb-sync scrcpy dbeaver-bin cling aircrack-ng kitty
|
||||
weston cage openbox krita fprettify # jetbrains.clion
|
||||
# password and key management
|
||||
yubikey-manager bitwarden hashcat yubikey-personalization
|
||||
@@ -71,7 +71,9 @@ inputs:
|
||||
activitywatch super-productivity
|
||||
]
|
||||
++ (builtins.filter (p: !((p.meta.broken or false) || (builtins.elem p.pname or null [ "falkon" "kalzium" ])))
|
||||
(builtins.filter inputs.lib.isDerivation (builtins.attrValues kdePackages.kdeGear)));
|
||||
(builtins.filter inputs.lib.isDerivation (builtins.attrValues kdePackages.kdeGear)))
|
||||
++ (inputs.lib.optionals (inputs.config.nixos.system.gui.implementation == "kde")
|
||||
[ inputs.topInputs.plasma-manager.packages.${inputs.pkgs.system}.rc2nix ]);
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
[ phonopy scipy scikit-learn jupyterlab autograd inputs.pkgs.localPackages.phono3py numpy ])];
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ inputs:
|
||||
[
|
||||
# basic tools
|
||||
beep dos2unix gnugrep pv tmux screen parallel tldr cowsay jq yq ipfetch localPackages.pslist
|
||||
fastfetch reptyr duc ncdu progress libva-utils ksh neofetch dateutils kitty glib
|
||||
fastfetch reptyr duc ncdu progress libva-utils ksh neofetch dateutils glib
|
||||
# lsxx
|
||||
pciutils usbutils lshw util-linux lsof dmidecode lm_sensors hwloc acpica-tools ethtool
|
||||
# top
|
||||
@@ -43,32 +43,8 @@ inputs:
|
||||
(octodns.withProviders (_: with octodns-providers; [ cloudflare ]))
|
||||
# stupid things
|
||||
toilet lolcat localPackages.stickerpicker graph-easy
|
||||
# office
|
||||
pdfgrep ffmpeg-full hdf5
|
||||
# scientific computing
|
||||
(if inputs.config.nixos.system.nixpkgs.cuda != null then localPackages.mumax else emptyDirectory)
|
||||
(if inputs.config.nixos.system.nixpkgs.cuda != null
|
||||
then (lammps.override { stdenv = cudaPackages.backendStdenv; }).overrideAttrs (prev:
|
||||
{
|
||||
cmakeFlags = prev.cmakeFlags ++
|
||||
[ "-DPKG_GPU=on" "-DGPU_API=cuda" "-DCMAKE_POLICY_DEFAULT_CMP0146=OLD" ];
|
||||
nativeBuildInputs = prev.nativeBuildInputs ++ [ cudaPackages.cudatoolkit ];
|
||||
buildInputs = prev.buildInputs ++ [ mpi ];
|
||||
})
|
||||
else lammps-mpi)
|
||||
]
|
||||
++ (with inputs.config.boot.kernelPackages; [ cpupower usbip ])
|
||||
++ (inputs.lib.optionals (inputs.config.nixos.system.gui.implementation == "kde")
|
||||
[ inputs.topInputs.plasma-manager.packages.${inputs.pkgs.system}.rc2nix ]);
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
[
|
||||
openai python-telegram-bot fastapi-cli pypdf2 pandas matplotlib plotly gunicorn redis jinja2 certifi
|
||||
charset-normalizer idna orjson psycopg2 inquirerpy requests tqdm pydbus inputs.pkgs.localPackages.brokenaxes
|
||||
# allow pandas read odf
|
||||
odfpy
|
||||
# for vasp plot-workfunc.py
|
||||
ase
|
||||
])];
|
||||
++ (with inputs.config.boot.kernelPackages; [ cpupower usbip ]);
|
||||
};
|
||||
programs =
|
||||
{
|
||||
|
||||
39
modules/packages/server.nix
Normal file
39
modules/packages/server.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.packages.server = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{
|
||||
type = types.nullOr (types.submodule {});
|
||||
default = if builtins.elem inputs.config.nixos.model.type [ "server" "desktop" ] then {} else null;
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.packages) server; in inputs.lib.mkIf (server != null)
|
||||
{
|
||||
nixos.packages.packages =
|
||||
{
|
||||
_packages = with inputs.pkgs;
|
||||
[
|
||||
# office
|
||||
pdfgrep ffmpeg-full hdf5
|
||||
# scientific computing
|
||||
(if inputs.config.nixos.system.nixpkgs.cuda != null then localPackages.mumax else emptyDirectory)
|
||||
(if inputs.config.nixos.system.nixpkgs.cuda != null
|
||||
then (lammps.override { stdenv = cudaPackages.backendStdenv; }).overrideAttrs (prev:
|
||||
{
|
||||
cmakeFlags = prev.cmakeFlags ++
|
||||
[ "-DPKG_GPU=on" "-DGPU_API=cuda" "-DCMAKE_POLICY_DEFAULT_CMP0146=OLD" ];
|
||||
nativeBuildInputs = prev.nativeBuildInputs ++ [ cudaPackages.cudatoolkit ];
|
||||
buildInputs = prev.buildInputs ++ [ mpi ];
|
||||
})
|
||||
else lammps-mpi)
|
||||
];
|
||||
_pythonPackages = [(pythonPackages: with pythonPackages;
|
||||
[
|
||||
openai python-telegram-bot fastapi-cli pypdf2 pandas matplotlib plotly gunicorn redis jinja2 certifi
|
||||
charset-normalizer idna orjson psycopg2 inquirerpy requests tqdm pydbus inputs.pkgs.localPackages.brokenaxes
|
||||
# allow pandas read odf
|
||||
odfpy
|
||||
# for vasp plot-workfunc.py
|
||||
ase
|
||||
])];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user