mirror of
https://github.com/EdenQwQ/nixos.git
synced 2026-05-11 17:35:56 +08:00
add templates
This commit is contained in:
parent
eac820e632
commit
36d96fd613
6 changed files with 205 additions and 9 deletions
51
templates/python-analyze/flake.nix
Normal file
51
templates/python-analyze/flake.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ ... }@inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" ];
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
devShells = {
|
||||
default =
|
||||
let
|
||||
packageOverrides = pkgs.callPackage ./python-packages.nix { };
|
||||
python = pkgs.python312.override { inherit packageOverrides; };
|
||||
in
|
||||
pkgs.mkShellNoCC {
|
||||
buildInputs = [
|
||||
(python.withPackages (
|
||||
ps: with ps; [
|
||||
numpy
|
||||
pandas
|
||||
scipy
|
||||
requests
|
||||
matplotlib
|
||||
scikit-learn
|
||||
seaborn
|
||||
pingouin
|
||||
]
|
||||
))
|
||||
];
|
||||
shellHook = ''
|
||||
fish
|
||||
'';
|
||||
};
|
||||
};
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
programs.ruff-format.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue