Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos

stylix
Moritz Böhme 2023-10-10 11:58:41 +02:00
commit 9ab5495843
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
12 changed files with 94 additions and 46 deletions

View File

@ -71,6 +71,29 @@
"type": "github" "type": "github"
} }
}, },
"codeium-nvim": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1696904458,
"narHash": "sha256-3L4I98OkSY0ayGu+p/sO1g1mC6jp2olv1kQVDVNARvE=",
"owner": "jcdickinson",
"repo": "codeium.nvim",
"rev": "d9b026071378c18b7536be298365a2e3885cd64f",
"type": "github"
},
"original": {
"owner": "jcdickinson",
"repo": "codeium.nvim",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -434,11 +457,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1696737557, "lastModified": 1696776279,
"narHash": "sha256-YD/pjDjj/BNmisEvRdM/vspkCU3xyyeGVAUWhvVSi5Y=", "narHash": "sha256-PRJiq+DSq5o/Dzd7ZYWTA8larDg4btkTICPzfjjalig=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3c1d8758ac3f55ab96dcaf4d271c39da4b6e836d", "rev": "6dfbdc977e059f30376e23f70f67d9726d5c91b8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -563,11 +586,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1696923230, "lastModified": 1696931607,
"narHash": "sha256-Evn8vdETCSxQH6txfwYIN7N69RKSfZLkN7dSqfnRYRw=", "narHash": "sha256-gVV772uE7Th5iyRTh+KNA4YOBzaL9DjmNz+qep2f/Ww=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "906535b6191830a247e004f53d74359a60883ba4", "rev": "c74fd1b820c24ebe1065af1cabbe2b6a4c86641d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -931,6 +954,22 @@
"type": "github" "type": "github"
} }
}, },
"none-ls-nvim": {
"flake": false,
"locked": {
"lastModified": 1696658105,
"narHash": "sha256-4+B2F4ZweWTqXlhSs0jiBaKSv52G4X7p37KHfYl6sPo=",
"owner": "nvimtools",
"repo": "none-ls.nvim",
"rev": "ae339f45590cc421a68de885fc5a3261cc247362",
"type": "github"
},
"original": {
"owner": "nvimtools",
"repo": "none-ls.nvim",
"type": "github"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1696923989, "lastModified": 1696923989,
@ -1040,6 +1079,7 @@
"agenix": "agenix", "agenix": "agenix",
"arkenfox-userjs": "arkenfox-userjs", "arkenfox-userjs": "arkenfox-userjs",
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
"codeium-nvim": "codeium-nvim",
"devshell": "devshell", "devshell": "devshell",
"disko": "disko", "disko": "disko",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
@ -1056,6 +1096,7 @@
"nix-lazy-nvim": "nix-lazy-nvim", "nix-lazy-nvim": "nix-lazy-nvim",
"nix-super": "nix-super", "nix-super": "nix-super",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_8",
"none-ls-nvim": "none-ls-nvim",
"nur": "nur", "nur": "nur",
"nvim-lspconfig": "nvim-lspconfig", "nvim-lspconfig": "nvim-lspconfig",
"nvim-puppeteer": "nvim-puppeteer", "nvim-puppeteer": "nvim-puppeteer",

View File

@ -30,6 +30,11 @@
# Neovim # Neovim
actions-preview-nvim.flake = false; actions-preview-nvim.flake = false;
actions-preview-nvim.url = "github:aznhe21/actions-preview.nvim"; actions-preview-nvim.url = "github:aznhe21/actions-preview.nvim";
codeium-nvim = {
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
url = "github:jcdickinson/codeium.nvim";
};
hmts-nvim.flake = false; hmts-nvim.flake = false;
hmts-nvim.url = "github:calops/hmts.nvim"; hmts-nvim.url = "github:calops/hmts.nvim";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
@ -46,6 +51,8 @@
telekasten-nvim.url = "github:renerocksai/telekasten.nvim"; telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
telescope-nvim.flake = false; telescope-nvim.flake = false;
telescope-nvim.url = "github:nvim-telescope/telescope.nvim"; telescope-nvim.url = "github:nvim-telescope/telescope.nvim";
none-ls-nvim.flake = false;
none-ls-nvim.url = "github:nvimtools/none-ls.nvim";
# Hyprland # Hyprland
hypr-contrib.url = "github:hyprwm/contrib"; hypr-contrib.url = "github:hyprwm/contrib";

View File

@ -123,6 +123,8 @@ in
"|" = "split-window -h"; "|" = "split-window -h";
"C-l" = "send-keys C-l"; "C-l" = "send-keys C-l";
"R" = "source-file $XDG_CONFIG_HOME/tmux/tmux.conf \\; display-message 'Reloaded tmux.conf'"; "R" = "source-file $XDG_CONFIG_HOME/tmux/tmux.conf \\; display-message 'Reloaded tmux.conf'";
"f" = "new-window ts";
"a" = "new-window ta";
}; };
copy-mode-vi = { copy-mode-vi = {
"v" = "send -X begin-selection"; "v" = "send -X begin-selection";

View File

@ -30,12 +30,17 @@ in
[ [
alejandra alejandra
black black
checkmake
deadnix deadnix
dotenv-linter
fish
isort isort
jq jq
nixd nixd
nixpkgs-fmt nixpkgs-fmt
nodePackages.bash-language-server nodePackages.bash-language-server
nodePackages.jsonlint
ruff-lsp
rustfmt rustfmt
shellcheck shellcheck
shfmt shfmt
@ -46,6 +51,7 @@ in
typst typst
typst-lsp typst-lsp
yamlfmt yamlfmt
yamllint
]; ];
extraLuaConfig = readFile ./options.lua; extraLuaConfig = readFile ./options.lua;
lazy.enable = true; lazy.enable = true;

View File

@ -86,26 +86,13 @@ with builtins;
{ plugin = cmp-cmdline; } { plugin = cmp-cmdline; }
{ plugin = cmp-nvim-lsp; } { plugin = cmp-nvim-lsp; }
{ plugin = cmp_luasnip; } { plugin = cmp_luasnip; }
{
plugin = codeium-nvim;
opts = { };
}
{ plugin = friendly-snippets; } { plugin = friendly-snippets; }
{ plugin = lspkind-nvim; } { plugin = lspkind-nvim; }
{ plugin = luasnip; } { plugin = luasnip; }
{
plugin = copilot-cmp;
opts = { };
dependencies = [
{
plugin = copilot-lua;
opts = {
suggestion = { enabled = false; };
panel = { enabled = false; };
};
conf = /* lua */ ''
require("copilot").setup(opts)
vim.cmd("Copilot disable")
'';
}
];
}
]; ];
} }
{ {
@ -117,7 +104,6 @@ with builtins;
event = [ "BufRead" "BufNewFile" ]; event = [ "BufRead" "BufNewFile" ];
conf = readFile ./lua/nvim-lspconfig.lua; conf = readFile ./lua/nvim-lspconfig.lua;
dependencies = [ dependencies = [
{ plugin = lsp_signature-nvim; }
{ {
plugin = null-ls-nvim; plugin = null-ls-nvim;
conf = readFile ./lua/null-ls-nvim.lua; conf = readFile ./lua/null-ls-nvim.lua;

View File

@ -8,9 +8,15 @@ null_ls.setup({
-- Completion -- Completion
null_ls.builtins.completion.spell, null_ls.builtins.completion.spell,
-- Diagnostics -- Diagnostics
null_ls.builtins.diagnostics.checkmake,
null_ls.builtins.diagnostics.deadnix, null_ls.builtins.diagnostics.deadnix,
null_ls.builtins.diagnostics.dotenv_linter,
null_ls.builtins.diagnostics.fish,
null_ls.builtins.diagnostics.jsonlint,
null_ls.builtins.diagnostics.shellcheck, null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.statix, null_ls.builtins.diagnostics.statix,
null_ls.builtins.diagnostics.trail_space,
null_ls.builtins.diagnostics.yamllint,
}, },
}) })

View File

@ -17,7 +17,7 @@ cmp.setup({
maxwidth = 50, -- prevent the popup from showing more than provided characters maxwidth = 50, -- prevent the popup from showing more than provided characters
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
symbol_map = { symbol_map = {
Copilot = "", Codeium = "",
}, },
}), }),
}, },
@ -56,8 +56,8 @@ cmp.setup({
{ name = "async_path", priority = 1 }, { name = "async_path", priority = 1 },
{ name = "buffer", priority = 1 }, { name = "buffer", priority = 1 },
{ name = "luasnip", priority = 2 }, { name = "luasnip", priority = 2 },
{ name = "copilot", group_index = 3 }, { name = "codeium", priority = 3 },
{ name = "nvim_lsp", priority = 4 }, { name = "nvim_lsp", priority = 3 },
}, },
}) })

View File

@ -19,14 +19,14 @@ let
tmux-sessionizer = pkgs.writeFishApplication { tmux-sessionizer = pkgs.writeFishApplication {
name = "ts"; name = "ts";
runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd fzf1 tmux-switch ]; runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd tmux-switch gawk ];
text = readFile ./tmux-sessionizer/script.fish; text = readFile ./tmux-sessionizer/script.fish;
completions = readFile ./tmux-sessionizer/completions.fish; completions = readFile ./tmux-sessionizer/completions.fish;
}; };
tmux-attach = pkgs.writeFishApplication { tmux-attach = pkgs.writeFishApplication {
name = "ta"; name = "ta";
runtimeInputs = with pkgs; [ tmux fzf1 tmux-switch ]; runtimeInputs = with pkgs; [ tmux tmux-switch ];
text = readFile ./tmux-attach/script.fish; text = readFile ./tmux-attach/script.fish;
completions = readFile ./tmux-attach/completions.fish; completions = readFile ./tmux-attach/completions.fish;
}; };
@ -97,7 +97,7 @@ in
if ! fish_is_root_user && test "$TERM_PROGRAM" != 'vscode' && ${insideVariableMissing} if ! fish_is_root_user && test "$TERM_PROGRAM" != 'vscode' && ${insideVariableMissing}
if test -z $tmux_autostarted if test -z $tmux_autostarted
set -x tmux_autostarted true set -x tmux_autostarted true
ts tmux new -A -s home
end end
end end
''; '';

View File

@ -1,4 +1,4 @@
set selected (tmux list-sessions -F '#{session_name}' 2>/dev/null | fzf1 $argv) set selected (tmux list-sessions -F '#{session_name}' 2>/dev/null | fzf --query "$argv")
if not test -n "$selected" if not test -n "$selected"
exit 1 exit 1
end end

9
modules/programs/tmux/tmux-sessionizer/script.fish Normal file → Executable file
View File

@ -1,4 +1,11 @@
set selected (fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf1 $argv) #!/usr/bin/env fish
set pipe (mktemp --dry-run)
mkfifo $pipe
fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec-batch dirname {} | tee $pipe >/dev/null &
fd . ~/ --min-depth 1 --max-depth 3 --type d --exec-batch realpath {} | tee $pipe >/dev/null &
set selected (cat $pipe | awk '!seen[$0]++' | fzf --query "$argv")
rm -f "$pipe"
set selected_name (basename $selected 2>/dev/null | string replace "." "_") set selected_name (basename $selected 2>/dev/null | string replace "." "_")

View File

@ -12,20 +12,6 @@ final: prev:
timers = inputs.timers.packages.${prev.system}.default; timers = inputs.timers.packages.${prev.system}.default;
hyprland = inputs.hyprland.packages.${prev.system}.default; hyprland = inputs.hyprland.packages.${prev.system}.default;
fzf1 = final.writeShellApplication {
name = "fzf1";
runtimeInputs = with final; [ coreutils fzf fd ];
text = ''
#!/usr/bin/env bash
selected=$(fzf --query="$*" -1 < /dev/stdin)
if [[ -z $selected ]]; then
exit 0
fi
echo "$selected"
'';
};
xorg = prev.xorg // { xorg = prev.xorg // {
lndir = prev.xorg.lndir.overrideAttrs (_: { lndir = prev.xorg.lndir.overrideAttrs (_: {
meta.mainProgram = "lndir"; meta.mainProgram = "lndir";

View File

@ -4,6 +4,8 @@ _: prev:
with lib.my; with lib.my;
{ {
vimPlugins = prev.vimPlugins // { vimPlugins = prev.vimPlugins // {
inherit (inputs.codeium-nvim.packages.${prev.system}.vimPlugins) codeium-nvim;
smartcolumn-nvim = prev.vimUtils.buildVimPlugin { smartcolumn-nvim = prev.vimUtils.buildVimPlugin {
pname = "smartcolumn-nvim"; pname = "smartcolumn-nvim";
version = mkVersionInput inputs.smartcolumn-nvim; version = mkVersionInput inputs.smartcolumn-nvim;
@ -49,5 +51,10 @@ with lib.my;
version = mkVersionInput inputs.nvim-puppeteer; version = mkVersionInput inputs.nvim-puppeteer;
src = inputs.nvim-puppeteer; src = inputs.nvim-puppeteer;
}; };
null-ls-nvim = prev.vimPlugins.null-ls-nvim.overrideAttrs (a: {
version = mkVersionInput inputs.none-ls-nvim;
src = inputs.none-ls-nvim;
});
}; };
} }