Compare commits

...

5 Commits

8 changed files with 57 additions and 49 deletions

12
git.nix
View File

@ -2,11 +2,10 @@
{ {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Leonora Tindall";
userEmail = "nora@nora.codes";
lfs.enable = true; lfs.enable = true;
delta.enable = true; settings = {
extraConfig = { user.name = "Leonora Tindall";
user.email = "nora@nora.codes";
init.defaultBranch = "main"; init.defaultBranch = "main";
push.default = "current"; push.default = "current";
color.ui = "auto"; color.ui = "auto";
@ -44,5 +43,10 @@
}; };
}; };
programs.delta = {
enable = true;
enableGitIntegration = true;
};
home.file.".gitignore".source = ./rcfiles/gitignore; home.file.".gitignore".source = ./rcfiles/gitignore;
} }

View File

@ -9,9 +9,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "1fa73bb2cc39e250eb01e511ae6ac83bfbf9f38c", "revision": "13a1beb7c9962e0d2ba35a4d5c87546509b89b7d",
"url": "https://github.com/nix-community/home-manager/archive/1fa73bb2cc39e250eb01e511ae6ac83bfbf9f38c.tar.gz", "url": "https://github.com/nix-community/home-manager/archive/13a1beb7c9962e0d2ba35a4d5c87546509b89b7d.tar.gz",
"hash": "06mz6f8b55x9hiyvbr8s77vmscyskqv00hv5zmcihdw5hhkrl8ls" "hash": "0c5b1cfhg0h2fxxjkczvzc6lmavqm0zvnmcqqw786rdr9ij8frax"
}, },
"nixgl": { "nixgl": {
"type": "Git", "type": "Git",
@ -22,15 +22,15 @@
}, },
"branch": "main", "branch": "main",
"submodules": false, "submodules": false,
"revision": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", "revision": "b6105297e6f0cd041670c3e8628394d4ee247ed5",
"url": "https://github.com/guibou/nixGL/archive/310f8e49a149e4c9ea52f1adf70cdc768ec53f8a.tar.gz", "url": "https://github.com/guibou/nixGL/archive/b6105297e6f0cd041670c3e8628394d4ee247ed5.tar.gz",
"hash": "1crnbv3mdx83xjwl2j63rwwl9qfgi2f1lr53zzjlby5lh50xjz4n" "hash": "1zv3bshk0l4hfh1s7s3jzwjxl0nqqcvc4a3kydd3d4lgh7651d3x"
}, },
"nixpkgs": { "nixpkgs": {
"type": "Channel", "type": "Channel",
"name": "nixos-unstable", "name": "nixos-unstable",
"url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre823481.3016b4b15d13/nixexprs.tar.xz", "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre942779.d6c719321308/nixexprs.tar.xz",
"hash": "1ml7yaq7r15rfpx9vqh32bisc2w7kdsv6kmclnb2g113fbv6fd85" "hash": "1lr296971vfbgqfcvf4qzx0cs85ry0s61cwsg8ksxbpskmvim0rh"
} }
}, },
"version": 5 "version": 5

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
services.ollama = {
enable = true;
acceleration = "rocm";
environmentVariables = {
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
};
};
}

View File

@ -5,13 +5,9 @@
(python3.withPackages (ps: with ps; [ (python3.withPackages (ps: with ps; [
python-lsp-server python-lsp-server
python-lsp-jsonrpc python-lsp-jsonrpc
python-lsp-black
python-lsp-ruff python-lsp-ruff
pyls-isort jedi-language-server
pyls-flake8 ruff
flake8
isort
black
])) ]))
]; ];
} }

View File

@ -37,7 +37,6 @@ vim.keymap.set('n', '<leader>fh', tbuiltin.help_tags, {})
vim.keymap.set('n', '<leader>fs', tbuiltin.spell_suggest, {}) vim.keymap.set('n', '<leader>fs', tbuiltin.spell_suggest, {})
-- General LSP settings -- General LSP settings
vim.lsp.enable('pylsp')
-- LSP diagnostic signs -- LSP diagnostic signs
vim.diagnostic.config({ vim.diagnostic.config({
@ -62,30 +61,38 @@ vim.diagnostic.config({
} }
}) })
vim.keymap.set('n', '<leader><leader>d', '<cmd>lua vim.diagnostic.open_float()<CR>', { noremap = true, silent = true }) vim.keymap.set('n', '<leader><leader>d', '<cmd>lua vim.diagnostic.open_float()<CR>',
{ noremap = true, silent = true })
vim.keymap.set('n', '<leader><leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>',
{ noremap = true, silent = true })
vim.cmd([[ vim.cmd([[
set signcolumn=yes set signcolumn=yes
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false }) autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
]]) ]])
-- Rust tools for Rust-specific LSP -- Python-specific lspconfig
local rt = require("rust-tools") vim.lsp.enable('pylsp')
rt.setup({ vim.lsp.enable('jedi_language_server')
server = {
on_attach = function(_, bufnr) vim.lsp.config('ruff', {
-- ctrl + space for hover actions settings = {
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr }) ruff = {}
-- ,a for code actions
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
end,
} }
}) })
vim.lsp.enable('ruff')
vim.lsp.config('ty', {
settings = {
ty = {}
}
})
vim.lsp.enable('ty')
-- set up treesitter -- set up treesitter
require('nvim-treesitter.configs').setup { require('nvim-treesitter').setup {
auto_install = false, auto_install = false,
ident = { enable = true }, ident = { enable = true },
rainbow = { rainbow = {
enable = true, enable = true,
extended_mode = true, extended_mode = true,

11
ssh.nix
View File

@ -1,9 +1,16 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
programs.ssh = { programs.ssh = {
# NOTE: if issues arise, check out this option; we may need to set some
# of the default options again, manually.
enableDefaultConfig = false;
enable = true; enable = true;
addKeysToAgent = "yes"; matchBlocks = {
forwardAgent = true; "*" = {
addKeysToAgent = "yes";
forwardAgent = true;
};
};
}; };
services.ssh-agent.enable = true; services.ssh-agent.enable = true;

View File

@ -16,7 +16,6 @@ in
./jj.nix ./jj.nix
./jq.nix ./jq.nix
./nix-utils.nix ./nix-utils.nix
./ollama.nix
./pandoc.nix ./pandoc.nix
./python.nix ./python.nix
./ssh.nix ./ssh.nix

13
vim.nix
View File

@ -4,11 +4,12 @@
enable = true; enable = true;
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
withPython3 = true;
defaultEditor = true; defaultEditor = true;
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
vim-nix vim-nix
rust-vim rust-vim
rust-tools-nvim rustaceanvim
nvim-cmp nvim-cmp
snippets-nvim snippets-nvim
nvim-treesitter nvim-treesitter
@ -16,17 +17,21 @@
nvim-treesitter-parsers.lua nvim-treesitter-parsers.lua
nvim-treesitter-parsers.toml nvim-treesitter-parsers.toml
nvim-treesitter-parsers.python nvim-treesitter-parsers.python
jedi-vim
nvim-lspconfig nvim-lspconfig
nvim-lsputils nvim-lsputils
fzf-vim fzf-vim
sleuth vim-sleuth
whitespace-nvim # ,t to trim whitespace whitespace-nvim # ,t to trim whitespace
vimsence vimsence
vim-wordy #:Wordy [kind], :NoWordy vim-wordy #:Wordy [kind], :NoWordy
vim-pencil #:Pencil, :NoPencil vim-pencil #:Pencil, :NoPencil
telescope-nvim telescope-nvim
plenary-nvim
]; ];
extraLuaConfig = (builtins.readFile ./rcfiles/neovim.lua); extraPackages = with pkgs; [
ruff
ty
];
initLua = (builtins.readFile ./rcfiles/neovim.lua);
}; };
} }