more minor tweaks
This commit is contained in:
parent
df8b80a2c0
commit
0645376730
|
|
@ -15,15 +15,10 @@
|
||||||
# GPG configuration for user session
|
# GPG configuration for user session
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pinentry.package = pkgs.pinentry-rofi; # Use rofi for consistency with desktop theme
|
pinentryPackage = pkgs.pinentry-curses;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
defaultCacheTtl = 28800; # 8 hours
|
defaultCacheTtl = 28800; # 8 hours
|
||||||
maxCacheTtl = 86400; # 24 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 = {
|
programs.gpg = {
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
cd ~/usr/helm && sudo darwin-rebuild switch --impure --flake ".#Anishs-MacBook-Pro" && cd $OLDPWD
|
cd ~/usr/helm && sudo darwin-rebuild switch --impure --flake ".#Anishs-MacBook-Pro" && cd $OLDPWD
|
||||||
else
|
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
|
fi
|
||||||
'';
|
'';
|
||||||
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@
|
||||||
userEmail = "anish+git@lakhwara.com";
|
userEmail = "anish+git@lakhwara.com";
|
||||||
delta.enable = true;
|
delta.enable = true;
|
||||||
signing = {
|
signing = {
|
||||||
signByDefault = true;
|
signByDefault = if pkgs.stdenv.isLinux then false else true;
|
||||||
key = "7FC5DF072EF7B716";
|
key = if pkgs.stdenv.isLinux then "B8492C8FB53397B7" else "7FC5DF072EF7B716";
|
||||||
};
|
};
|
||||||
|
|
||||||
ignores = [
|
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 {
|
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
|
||||||
name = "lspsaga.nvim";
|
name = "lspsaga.nvim";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
|
@ -863,21 +853,6 @@ in
|
||||||
require("which-key").setup{}
|
require("which-key").setup{}
|
||||||
require('leap').set_default_keymaps()
|
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
|
-- supercollider
|
||||||
local scnvim = require 'scnvim'
|
local scnvim = require 'scnvim'
|
||||||
local map = scnvim.map
|
local map = scnvim.map
|
||||||
|
|
@ -1081,67 +1056,6 @@ in
|
||||||
}):find()
|
}):find()
|
||||||
end
|
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
|
EOF
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
@ -1260,7 +1174,6 @@ in
|
||||||
# custom
|
# custom
|
||||||
yuck-vim
|
yuck-vim
|
||||||
nvim-parinfer
|
nvim-parinfer
|
||||||
amp-nvim
|
|
||||||
# vim-processing
|
# vim-processing
|
||||||
] ++ lib.optionals pkgs.stdenv.isLinux [
|
] ++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
# Linux-only plugins
|
# Linux-only plugins
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ in {
|
||||||
unstable.newsflash
|
unstable.newsflash
|
||||||
unstable.liferea
|
unstable.liferea
|
||||||
unstable.gh
|
unstable.gh
|
||||||
unstable.flyctl
|
flyctl
|
||||||
|
|
||||||
kooha
|
kooha
|
||||||
light
|
light
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue