-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flake: replaced shell nix with flake
Signed-off-by: aserowy <[email protected]>
- Loading branch information
Showing
4 changed files
with
116 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
use_nix | ||
use flake |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
description = "tmux.nvim env"; | ||
|
||
inputs = { | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
config.allowUnfree = true; | ||
}; | ||
in | ||
with pkgs; { | ||
devShell = | ||
pkgs.mkShell { | ||
buildInputs = [ | ||
gh | ||
lua51Packages.busted | ||
lua51Packages.luacov | ||
lua51Packages.luacheck | ||
nixpkgs-fmt | ||
nodePackages.dockerfile-language-server-nodejs | ||
nodePackages.markdownlint-cli | ||
nodePackages.prettier | ||
stylua | ||
sumneko-lua-language-server | ||
]; | ||
shellHook = '' | ||
export LUA_PATH="$PWD/?.lua;$PWD/lua/?/init.lua;$PWD/lua/?.lua;$LUA_PATH" | ||
FULLPATH=$(realpath $0) | ||
BASEDIR=$(dirname $FULLPATH) | ||
# test environment | ||
alias tb="docker build -t tmnv-te $BASEDIR/.dev" | ||
alias te="docker run -it -v $BASEDIR:/workspace tmnv-te" | ||
# format and check -> fac :) | ||
alias fac="prettier --write README.md \ | ||
&& stylua .dev/ \ | ||
&& luacheck .dev/ \ | ||
&& stylua lua/ \ | ||
&& luacheck lua/ \ | ||
&& stylua spec/ \ | ||
&& luacheck spec/ \ | ||
&& busted --verbose -c" | ||
''; | ||
}; | ||
}); | ||
} |