add trashy and neogit

This commit is contained in:
Kopatz
2024-06-08 17:09:02 +02:00
parent c08dc9e86f
commit 9910bfeeb7
5 changed files with 42 additions and 6 deletions

View File

@@ -78,10 +78,20 @@
action = "<CMD>Gitsigns toggle_deleted"; action = "<CMD>Gitsigns toggle_deleted";
options.desc = "Gitsigns deleted"; options.desc = "Gitsigns deleted";
} }
{
key = "<leader>gc";
action = "<CMD>NvimTreeClose<CR><CMD>Neogit<CR>";
options.desc = "Commit changes";
}
{ {
key = "<leader>gd"; key = "<leader>gd";
action = "<CMD>Gitsigns diffthis<CR>"; action = "<CMD>NvimTreeClose<CR><CMD>DiffviewOpen<CR>";
options.desc = "Gitsigns diff this buffer"; options.desc = "View git changes";
}
{
key = "<leader>gq";
action = "<CMD>DiffviewClose<CR><CMD>NvimTreeOpen<CR>";
options.desc = "Close git changes";
} }
{ {
mode = "n"; mode = "n";

View File

@@ -1,4 +1,13 @@
{ {
plugins.diffview = {
enable = true;
};
plugins.neogit = {
enable = true;
integrations = {
diffview = true;
};
};
plugins.gitsigns = { plugins.gitsigns = {
enable = true; enable = true;
settings = { settings = {

View File

@@ -18,6 +18,7 @@
updateOffline = "sudo nixos-rebuild switch --option substitute false"; updateOffline = "sudo nixos-rebuild switch --option substitute false";
goto = "cd $(find ~/projects -maxdepth 2 -type d | ${pkgs.fzf}/bin/fzf)"; goto = "cd $(find ~/projects -maxdepth 2 -type d | ${pkgs.fzf}/bin/fzf)";
dev= "nix-shell --run zsh"; dev= "nix-shell --run zsh";
rm= "trashy put";
}; };
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;

View File

@@ -44,6 +44,7 @@ in
nix-output-monitor # nom nix-output-monitor # nom
nvd # nix diff, example: nvd diff /nix/var/nix/profiles/system-389-link /nix/var/nix/profiles/system-390-link nvd # nix diff, example: nvd diff /nix/var/nix/profiles/system-389-link /nix/var/nix/profiles/system-390-link
compsize compsize
trashy # move files to trash
]; ];
}; };
} }

View File

@@ -1,7 +1,7 @@
# This file defines overlays # This file defines overlays
{inputs, ...}: { { inputs, ... }: {
# This one brings our custom packages from the 'pkgs' directory # This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ./pkgs {pkgs = final;}; additions = final: _prev: import ./pkgs { pkgs = final; };
# This one contains whatever you want to overlay # This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.
@@ -9,8 +9,23 @@
modifications = final: prev: { modifications = final: prev: {
discord = prev.discord.override { withVencord = true; }; discord = prev.discord.override { withVencord = true; };
tetrio-desktop = prev.tetrio-desktop.override { withTetrioPlus = true; }; tetrio-desktop = prev.tetrio-desktop.override { withTetrioPlus = true; };
nerdfonts = prev.nerdfonts.override { fonts = ["Hack" "Noto"]; }; nerdfonts = prev.nerdfonts.override { fonts = [ "Hack" "Noto" ]; };
waybar = prev.waybar.overrideAttrs (oldAttrs: { mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; }); waybar = prev.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
trashy = prev.trashy.overrideAttrs rec {
version = "unstable-2.0.0";
src = prev.fetchFromGitHub {
owner = "oberblastmeister";
repo = "trashy";
rev = "7c48827e55bca5a3188d3de44afda3028837b34b";
sha256 = "1pxmeXUkgAITouO0mdW6DgZR6+ai2dax2S4hV9jcJLM=";
};
cargoDeps = prev.rustPlatform.fetchCargoTarball {
inherit src;
hash = "sha256-/q/ZCpKkwhnPh3MMVNYZw6XvjyQpoZDBXCPagliGr1M=";
};
};
# example = prev.example.overrideAttrs (oldAttrs: rec { # example = prev.example.overrideAttrs (oldAttrs: rec {
# ... # ...
# }); # });