feat: Set up devshell
This commit is contained in:
parent
98ef1506d1
commit
10f393c35a
3 changed files with 1764 additions and 24 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
tags
|
tags
|
||||||
.luarc.json
|
.luarc.json
|
||||||
/result
|
/result
|
||||||
|
.devenv
|
||||||
|
|
1739
flake.lock
1739
flake.lock
File diff suppressed because it is too large
Load diff
48
flake.nix
48
flake.nix
|
@ -7,6 +7,9 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
nixCats.url = "github:BirdeeHub/nixCats-nvim";
|
nixCats.url = "github:BirdeeHub/nixCats-nvim";
|
||||||
|
|
||||||
|
devenv.url = "github:cachix/devenv";
|
||||||
|
marleyos.url = "git+https://codewith.babesonthe.net/punkfairie/marleyos";
|
||||||
|
|
||||||
neovim-nightly-overlay = {
|
neovim-nightly-overlay = {
|
||||||
url = "github:nix-community/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 = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixCats,
|
nixCats,
|
||||||
|
devenv,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (nixCats) utils;
|
inherit (nixCats) utils;
|
||||||
|
@ -366,17 +375,36 @@
|
||||||
defaultPackage = nixCatsBuilder defaultPackageName;
|
defaultPackage = nixCatsBuilder defaultPackageName;
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
in {
|
in {
|
||||||
packages = utils.mkAllWithDefault defaultPackage;
|
packages =
|
||||||
|
(utils.mkAllWithDefault defaultPackage)
|
||||||
# Choose your package for devShell and add whatever else you want in it.
|
// {
|
||||||
devShells = {
|
devenv-up = self.devShells.${system}.default.config.procfileScript;
|
||||||
default = pkgs.mkShell {
|
devenv-test = self.devShells.${system}.default.config.test;
|
||||||
name = defaultPackageName;
|
|
||||||
packages = [defaultPackage];
|
|
||||||
inputsFrom = [];
|
|
||||||
shellHook = ''
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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
|
// (let
|
||||||
|
|
Loading…
Reference in a new issue