nixos-config/template/devenv/flake.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

2025-03-20 11:16:32 +08:00
{
inputs = {
2025-10-16 17:37:31 -07:00
devenv = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:cachix/devenv";
};
2025-03-20 11:16:32 +08:00
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2025-10-16 17:37:31 -07:00
nixpkgs-python = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:cachix/nixpkgs-python";
};
2025-03-20 11:16:32 +08:00
};
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;
};
}
];
};
});
}