feat: Set up devshell

This commit is contained in:
punkfairie 2025-03-16 15:32:00 -07:00
parent 98ef1506d1
commit 10f393c35a
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
3 changed files with 1764 additions and 24 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
tags
.luarc.json
/result
.devenv

1739
flake.lock

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,9 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixCats.url = "github:BirdeeHub/nixCats-nvim";
devenv.url = "github:cachix/devenv";
marleyos.url = "git+https://codewith.babesonthe.net/punkfairie/marleyos";
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
};
@ -27,10 +30,16 @@
};
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs = {
self,
nixpkgs,
nixCats,
devenv,
...
} @ inputs: let
inherit (nixCats) utils;
@ -366,17 +375,36 @@
defaultPackage = nixCatsBuilder defaultPackageName;
pkgs = import nixpkgs {inherit system;};
in {
packages = utils.mkAllWithDefault defaultPackage;
# Choose your package for devShell and add whatever else you want in it.
devShells = {
default = pkgs.mkShell {
name = defaultPackageName;
packages = [defaultPackage];
inputsFrom = [];
shellHook = ''
'';
packages =
(utils.mkAllWithDefault defaultPackage)
// {
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 = [
({
pkgs,
config,
...
}: {
packages = [
defaultPackage
];
pre-commit.hooks = {
alejandra.enable = true;
deadnix.enable = true;
statix.enable = true;
stylua.enable = true;
end-of-file-fixer.enable = true;
trim-trailing-whitespace.enable = true;
no-commit-to-branch.enable = true;
};
})
];
};
})
// (let