add treefmt and jupyter lab
This commit is contained in:
58
flake.nix
Normal file
58
flake.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
description = "Your jupyenv project";
|
||||
|
||||
nixConfig.extra-substituters = [
|
||||
"https://tweag-jupyter.cachix.org"
|
||||
];
|
||||
nixConfig.extra-trusted-public-keys = [
|
||||
"tweag-jupyter.cachix.org-1:UtNH4Zs6hVUFpFBTLaA4ejYavPo5EFFqgd7G7FxGW9g="
|
||||
];
|
||||
|
||||
inputs = {
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
jupyenv.url = "github:tweag/jupyenv";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [ ./treefmt.nix ];
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
perSystem =
|
||||
{
|
||||
lib,
|
||||
system,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (inputs.jupyenv.lib.${system}) mkJupyterlabNew;
|
||||
jupyterlab = mkJupyterlabNew (
|
||||
{ ... }:
|
||||
{
|
||||
# nixpkgs = nixpkgs;
|
||||
imports = [ (import ./kernels.nix) ];
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
tex-fmt
|
||||
];
|
||||
};
|
||||
packages = {
|
||||
inherit jupyterlab;
|
||||
};
|
||||
packages.default = jupyterlab;
|
||||
apps.default.program = "${jupyterlab}/bin/jupyter-lab";
|
||||
apps.default.type = "app";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user