feat: add python template
This commit is contained in:
parent
1735fb38da
commit
c17d3f21d7
3 changed files with 27 additions and 0 deletions
|
@ -208,6 +208,12 @@
|
|||
];
|
||||
})
|
||||
./hosts;
|
||||
|
||||
templates = {
|
||||
python = {
|
||||
path = ./templates/python;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
6
templates/python/.envrc
Normal file
6
templates/python/.envrc
Normal file
|
@ -0,0 +1,6 @@
|
|||
use flake
|
||||
export PYTHONPATH="$(pwd)/src:$PYTHONPATH"
|
||||
if [ ! -z $NIX_LD ]; then
|
||||
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
||||
fi
|
||||
layout poetry
|
15
templates/python/flake.nix
Normal file
15
templates/python/flake.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
description = "Simple python flake";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ python3 poetry ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue