SeaCogs/flake.nix

64 lines
1.6 KiB
Nix
Raw Normal View History

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-python.url = "github:cachix/nixpkgs-python";
2025-01-22 08:57:20 -06:00
nixpkgs-python.inputs = {
nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv";
devenv.inputs.nixpkgs.follows = "nixpkgs";
};
nixConfig = {
2025-01-22 08:57:20 -06:00
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
2025-01-22 08:57:20 -06:00
outputs =
{
self,
nixpkgs,
devenv,
systems,
...
}@inputs:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = forEachSystem (system: {
devenv-up = self.devShells.${system}.default.config.procfileScript;
devenv-test = self.devShells.${system}.default.config.test;
});
2025-01-22 08:57:20 -06:00
devShells = forEachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
2024-11-20 12:33:59 -05:00
default = devenv.lib.mkShell {
inherit inputs pkgs;
2025-01-22 08:57:20 -06:00
modules = [
{
languages.python = {
2024-11-20 12:33:59 -05:00
enable = true;
2025-01-22 08:57:20 -06:00
version = "3.11";
venv.enable = true;
uv = {
enable = true;
2025-01-22 08:57:20 -06:00
sync = {
enable = true;
allExtras = true;
};
};
2024-11-20 12:33:59 -05:00
};
2025-01-22 08:57:20 -06:00
}
];
2024-11-20 12:33:59 -05:00
};
2025-01-22 08:57:20 -06:00
}
);
};
}