more minor tweaks
This commit is contained in:
parent
df8b80a2c0
commit
0645376730
|
|
@ -15,15 +15,10 @@
|
|||
# GPG configuration for user session
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
pinentry.package = pkgs.pinentry-rofi; # Use rofi for consistency with desktop theme
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
enableSshSupport = true;
|
||||
defaultCacheTtl = 28800; # 8 hours
|
||||
maxCacheTtl = 86400; # 24 hours
|
||||
extraConfig = ''
|
||||
pinentry-program ${pkgs.writeShellScript "pinentry-rofi-themed" ''
|
||||
exec ${pkgs.pinentry-rofi}/bin/pinentry-rofi -theme ~/.config/rofi/theme/passmenu.rasi "$@"
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.gpg = {
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@
|
|||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
cd ~/usr/helm && sudo darwin-rebuild switch --impure --flake ".#Anishs-MacBook-Pro" && cd $OLDPWD
|
||||
else
|
||||
cd /tmp && sudo nixos-rebuild switch --flake --impure '/home/anish/usr/helm#curve' && cd $OLDPWD
|
||||
cd /tmp && sudo nixos-rebuild switch --impure --flake '/home/anish/usr/helm#curve' && cd $OLDPWD
|
||||
fi
|
||||
'';
|
||||
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
userEmail = "anish+git@lakhwara.com";
|
||||
delta.enable = true;
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = "7FC5DF072EF7B716";
|
||||
signByDefault = if pkgs.stdenv.isLinux then false else true;
|
||||
key = if pkgs.stdenv.isLinux then "B8492C8FB53397B7" else "7FC5DF072EF7B716";
|
||||
};
|
||||
|
||||
ignores = [
|
||||
|
|
|
|||
|
|
@ -11,16 +11,6 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
amp-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "amp-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "sourcegraph";
|
||||
repo = "amp.nvim";
|
||||
rev = "main";
|
||||
sha256 = "Sm/SQEIZlnqu/sD+MhZzgGm3bf+HnADOOimZ2Q++MXU=";
|
||||
};
|
||||
};
|
||||
|
||||
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "lspsaga.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
|
|
@ -863,21 +853,6 @@ in
|
|||
require("which-key").setup{}
|
||||
require('leap').set_default_keymaps()
|
||||
|
||||
${lib.optionalString (customPlugins.amp-nvim != null) ''
|
||||
-- Setup amp.nvim
|
||||
require('amp').setup({
|
||||
auto_start = true,
|
||||
log_level = "info",
|
||||
completion_enabled = true
|
||||
})
|
||||
-- require('amp.completion').setup({
|
||||
-- keymaps = {
|
||||
-- accept = "<C-y>",
|
||||
-- dismiss = "<C-n>",
|
||||
-- }
|
||||
-- })
|
||||
''}
|
||||
|
||||
-- supercollider
|
||||
local scnvim = require 'scnvim'
|
||||
local map = scnvim.map
|
||||
|
|
@ -1081,67 +1056,6 @@ in
|
|||
}):find()
|
||||
end
|
||||
|
||||
-- Setup amp.nvim
|
||||
require('amp').setup({
|
||||
auto_start = true,
|
||||
log_level = "info"
|
||||
})
|
||||
|
||||
-- Amp commands
|
||||
vim.api.nvim_create_user_command("AmpSend", function(opts)
|
||||
local message = opts.args
|
||||
if message == "" then
|
||||
print("Please provide a message to send")
|
||||
return
|
||||
end
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_message(message)
|
||||
end, {
|
||||
nargs = "*",
|
||||
desc = "Send a message to Amp",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpSendBuffer", function(opts)
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
|
||||
local content = table.concat(lines, "\n")
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_message(content)
|
||||
end, {
|
||||
nargs = "?",
|
||||
desc = "Send current buffer contents to Amp",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpPromptSelection", function(opts)
|
||||
local lines = vim.api.nvim_buf_get_lines(0, opts.line1 - 1, opts.line2, false)
|
||||
local text = table.concat(lines, "\n")
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_to_prompt(text)
|
||||
end, {
|
||||
range = true,
|
||||
desc = "Add selected text to Amp prompt",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpPromptRef", function(opts)
|
||||
local bufname = vim.api.nvim_buf_get_name(0)
|
||||
if bufname == "" then
|
||||
print("Current buffer has no filename")
|
||||
return
|
||||
end
|
||||
local relative_path = vim.fn.fnamemodify(bufname, ":.")
|
||||
local ref = "@" .. relative_path
|
||||
if opts.line1 ~= opts.line2 then
|
||||
ref = ref .. "#L" .. opts.line1 .. "-" .. opts.line2
|
||||
elseif opts.line1 > 1 then
|
||||
ref = ref .. "#L" .. opts.line1
|
||||
end
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_to_prompt(ref)
|
||||
end, {
|
||||
range = true,
|
||||
desc = "Add file reference (with selection) to Amp prompt",
|
||||
})
|
||||
|
||||
EOF
|
||||
|
||||
'';
|
||||
|
|
@ -1260,7 +1174,6 @@ in
|
|||
# custom
|
||||
yuck-vim
|
||||
nvim-parinfer
|
||||
amp-nvim
|
||||
# vim-processing
|
||||
] ++ lib.optionals pkgs.stdenv.isLinux [
|
||||
# Linux-only plugins
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ in {
|
|||
unstable.newsflash
|
||||
unstable.liferea
|
||||
unstable.gh
|
||||
unstable.flyctl
|
||||
flyctl
|
||||
|
||||
kooha
|
||||
light
|
||||
|
|
|
|||
Loading…
Reference in a new issue