feat: add a flake to the repo
This commit is contained in:
parent
c81dcb2e40
commit
e0f23380b4
4 changed files with 88 additions and 2 deletions
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1728888510,
|
||||
"narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
17
flake.nix
Normal file
17
flake.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
packages.x86_64-linux.default = pkgs.callPackage ./nix/package.nix { };
|
||||
};
|
||||
}
|
|
@ -34,5 +34,3 @@ lspconfig.bashls.setup({})
|
|||
lspconfig.zls.setup({})
|
||||
|
||||
lspconfig.ts_ls.setup({})
|
||||
|
||||
lspconfig.superhtml.setup({})
|
||||
|
|
44
nix/package.nix
Normal file
44
nix/package.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
deps = with pkgs; [
|
||||
lua
|
||||
|
||||
# Language Servers
|
||||
rust-analyzer
|
||||
nil
|
||||
pyright
|
||||
bash-language-server
|
||||
lua-language-server
|
||||
zls
|
||||
typescript
|
||||
nodePackages_latest.typescript-language-server
|
||||
|
||||
kdePackages.qtdeclarative # QML formatter
|
||||
|
||||
# Formatter
|
||||
python311Packages.black # Python formatter
|
||||
clang-tools
|
||||
nodePackages_latest.prettier # JSON, JS, TS formatter
|
||||
yamlfmt # YAML formatter
|
||||
taplo # TOML formatter
|
||||
rustfmt # Rust formatter
|
||||
shfmt # Shell, Bash etc.
|
||||
nixfmt-rfc-style
|
||||
stylua # lua formatter
|
||||
|
||||
# Misc
|
||||
ripgrep
|
||||
rustc
|
||||
cargo
|
||||
nodejs_22
|
||||
clang
|
||||
tree-sitter
|
||||
fd
|
||||
luajitPackages.luarocks
|
||||
wl-clipboard
|
||||
];
|
||||
in
|
||||
pkgs.writeShellScriptBin "nvim" ''
|
||||
export PATH=${lib.makeBinPath deps}:$PATH
|
||||
${pkgs.neovim}/bin/nvim -u ${../.}/init.lua
|
||||
''
|
Loading…
Add table
Reference in a new issue