Use devenv
This commit is contained in:
parent
c6d125fca9
commit
458c94c1fe
12 changed files with 86 additions and 155 deletions
43
template/devenv/flake.nix
Normal file
43
template/devenv/flake.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
inputs = {
|
||||
devenv.url = "github:cachix/devenv";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-python.url = "github:cachix/nixpkgs-python";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
devenv,
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in {
|
||||
packages = {
|
||||
devenv-up = self.devShells.${system}.default.config.procfileScript;
|
||||
devenv-test = self.devShells.${system}.default.config.test;
|
||||
};
|
||||
|
||||
devShells.default = devenv.lib.mkShell {
|
||||
inherit inputs pkgs;
|
||||
modules = [
|
||||
{
|
||||
git-hooks.hooks.alejandra.enable = true;
|
||||
languages = {
|
||||
nix.enable = true;
|
||||
# python.enable = true;
|
||||
# r.enable = true;
|
||||
# rust.enable = true;
|
||||
# typst.enable = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue