Compare commits

...

3 Commits

Author SHA1 Message Date
7de01201e8 Merge branch 'wrapped' 2026-07-03 19:28:21 +01:00
1dd3e16674 made the flake work with dendritic 2026-07-03 19:27:54 +01:00
388beee1b4 added terminal binds for the funzies 2026-07-02 14:37:34 +01:00
4 changed files with 101 additions and 84 deletions

37
flake.lock generated
View File

@@ -16,9 +16,44 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1780336545,
"narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4df1b885d76a54e1aa1a318f8d16fd6005b6401f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"wrappers": "wrappers"
}
},
"wrappers": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1782135443,
"narHash": "sha256-vAmbArdCyjqpVW+37aCy/PMBOLIqukUXLQuEKLwUhA4=",
"owner": "BirdeeHub",
"repo": "nix-wrapper-modules",
"rev": "6e7f66fa2cdf4d63162580b438f7fcf87c28a46f",
"type": "github"
},
"original": {
"owner": "BirdeeHub",
"repo": "nix-wrapper-modules",
"type": "github"
} }
} }
}, },

View File

@@ -3,13 +3,24 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
wrappers.url = "github:BirdeeHub/nix-wrapper-modules";
}; };
outputs = outputs = {
{ self, nixpkgs }: self,
let nixpkgs,
system = "x86_64-linux"; # change if needed ...
pkgs = import nixpkgs { inherit system; }; } @ inputs: let
# Define the systems you want to support
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
# A helper function to generate outputs for each system
# It imports nixpkgs for the system and passes the resulting 'pkgs' to the function 'f'
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f (import nixpkgs {inherit system;}));
in {
# Use the helper to generate the packages attribute for every system
packages = forAllSystems (
pkgs: let
pkgList = with pkgs; [ pkgList = with pkgs; [
# LSPs # LSPs
lua-language-server lua-language-server
@@ -38,57 +49,14 @@
imagemagick imagemagick
luarocks luarocks
]; ];
in {
nvimRemoteConfig = pkgs.runCommand "nvim-remote-config" { } '' # Define the default package for this system
mkdir -p $out/nvim-remote default = inputs.wrappers.wrappers.neovim.wrap {
cp ${./init.lua} $out/nvim-remote/init.lua inherit pkgs;
cp -r ${./lua} $out/nvim-remote/lua runtimePkgs = pkgList;
''; settings.config_directory = ./.;
mkWrappedNvim =
{
name,
extraWrapArgs ? "",
}:
pkgs.symlinkJoin {
inherit name;
paths = [ pkgs.neovim ];
buildInputs = [ pkgs.makeWrapper ];
meta.mainProgram = "nvim";
postBuild = ''
wrapProgram $out/bin/nvim \
--prefix PATH : ${pkgs.lib.makeBinPath pkgList} \
--set TREE_SITTER_LIB_PATH "${pkgs.tree-sitter}/lib" \
${extraWrapArgs}
'';
};
nvim-wrapped = mkWrappedNvim { name = "nvim"; };
nvim-remote = mkWrappedNvim {
name = "nvim-remote";
extraWrapArgs = ''
--set NVIM_APPNAME "nvim-remote" \
--set XDG_CONFIG_HOME "${nvimRemoteConfig}"
'';
};
in
{
packages.${system} = {
default = nvim-wrapped;
remote = nvim-remote;
};
devShells.${system}.default = pkgs.mkShell {
packages = [
nvim-wrapped
];
shellHook = ''
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
export DEVSHELL_NAME="󱄅 flake/#89dceb| neovim/green"
'';
}; };
}
);
}; };
} }

View File

@@ -29,6 +29,19 @@ Keymap("i", "<C-BS>", "<C-W>") -- C-Backscpace for whole words
Keymap("n", "<leader>d", "<cmd>lua vim.diagnostic.open_float()<CR>") -- Diagnostics for Linter Keymap("n", "<leader>d", "<cmd>lua vim.diagnostic.open_float()<CR>") -- Diagnostics for Linter
Keymap("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>") -- Diagnostics for Linter Keymap("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>") -- Diagnostics for Linter
-- Terminal Keymaps
Keymap("n", "<leader>tj", function() -- open term in new pane
vim.cmd.vnew()
vim.cmd.term()
vim.cmd.startinsert()
end)
Keymap("n", "<leader>tk", function() -- open term in new tab
vim.cmd.tabnew()
vim.cmd.term()
vim.cmd.startinsert()
end)
Keymap("t", "<C-D>", "<C-\\><C-n>") -- escape terminal with c-d
-- Flash keymaps -- Flash keymaps
Keymap("n", "ss", function() Keymap("n", "ss", function()
require("flash").jump() require("flash").jump()

View File

@@ -22,6 +22,7 @@ require("telescope").setup({
}, },
n = { n = {
["<CR>"] = actions.select_drop, ["<CR>"] = actions.select_drop,
["d"] = actions.delete_buffer,
}, },
}, },
}, },