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

nixos
Moritz Böhme 2023-12-08 16:27:02 +01:00
commit 05927d1ae6
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
9 changed files with 96 additions and 34 deletions

View File

@ -513,6 +513,22 @@
"type": "github"
}
},
"libgit2": {
"flake": false,
"locked": {
"lastModified": 1700492800,
"narHash": "sha256-bGNcbA6AMUWhpuagnVWR1ZBdbUcZVdZtbMaRxY5JiCU=",
"owner": "libgit2",
"repo": "libgit2",
"rev": "d9475611fec95cacec30fbd2c334b270e5265d3b",
"type": "github"
},
"original": {
"owner": "libgit2",
"repo": "libgit2",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
@ -616,17 +632,16 @@
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1698364851,
"narHash": "sha256-UQqC71YP6B5uOQ8HZRWQsbiMDKIROLhSNlnFPnDP27Y=",
"lastModified": 1701993865,
"narHash": "sha256-2BksxNhmUG+MFCejvXeIPivJ8273r6aS5sqC4W8pjw8=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "dacbb092b5d6e97127b3e57007474a5c47305164",
"rev": "3094e82f5b8b3ccf6ddd4917e881209faea35d90",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "dacbb092b5d6e97127b3e57007474a5c47305164",
"type": "github"
}
},
@ -668,22 +683,23 @@
"nix-super": {
"inputs": {
"flake-compat": "flake-compat_2",
"libgit2": "libgit2",
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs_7",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1697392285,
"narHash": "sha256-1IBnF9IuStUWoAKJ74HNhV46+9Cbf/yZP6h6hJOJ1Cg=",
"lastModified": 1700941252,
"narHash": "sha256-2c8miJcsG24YEtXOSjvgW0ES1ND5DpY+ymGPq3S56YE=",
"owner": "privatevoid-net",
"repo": "nix-super",
"rev": "ba035e1ea339a97e6ba6a1dd79e0c0e334240234",
"rev": "c076362db8b438c921d9bbe196ede50205f788c6",
"type": "github"
},
"original": {
"owner": "privatevoid-net",
"repo": "nix-super",
"rev": "ba035e1ea339a97e6ba6a1dd79e0c0e334240234",
"rev": "c076362db8b438c921d9bbe196ede50205f788c6",
"type": "github"
}
},
@ -1049,6 +1065,7 @@
"rofi-wayland": "rofi-wayland",
"smartcolumn-nvim": "smartcolumn-nvim",
"stable": "stable",
"statuscol-nvim": "statuscol-nvim",
"telekasten-nvim": "telekasten-nvim",
"timers": "timers"
}
@ -1085,6 +1102,23 @@
"type": "github"
}
},
"statuscol-nvim": {
"flake": false,
"locked": {
"lastModified": 1700946586,
"narHash": "sha256-g36X+9hoOhHlw/DRSYdidQpHTx3ibjXNHJvONi29Yk8=",
"owner": "luukvbaal",
"repo": "statuscol.nvim",
"rev": "fb56a46dc446d3e9b61c269dd4aadbfd509223a7",
"type": "github"
},
"original": {
"owner": "luukvbaal",
"ref": "0.10",
"repo": "statuscol.nvim",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,

View File

@ -21,7 +21,7 @@
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
# Programs
nix-super.url = "github:privatevoid-net/nix-super/ba035e1ea339a97e6ba6a1dd79e0c0e334240234";
nix-super.url = "github:privatevoid-net/nix-super/c076362db8b438c921d9bbe196ede50205f788c6";
rofi-wayland.flake = false;
rofi-wayland.url = "github:lbonn/rofi/wayland";
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
@ -36,7 +36,7 @@
};
hmts-nvim.flake = false;
hmts-nvim.url = "github:calops/hmts.nvim";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay/dacbb092b5d6e97127b3e57007474a5c47305164"; # HACK: because upstream is broken
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
nix-lazy-nvim.url = "git+https://git.moritzboeh.me/moritz/NixLazy.nvim";
nvim-lspconfig.flake = false;
nvim-lspconfig.url = "github:neovim/nvim-lspconfig";
@ -52,6 +52,8 @@
none-ls-nvim.url = "github:nvimtools/none-ls.nvim";
neotest-python.flake = false;
neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search";
statuscol-nvim.flake = false;
statuscol-nvim.url = "github:luukvbaal/statuscol.nvim/0.10"; # HACK: fix for neovim-nightly
# Hyprland
hypr-contrib.url = "github:hyprwm/contrib";

View File

@ -316,5 +316,21 @@ with builtins;
cmd = [ "ConformInfo" "Format" ];
conf = readFile ./lua/conform.lua;
}
{
plugin = neogen;
keys = [
{ key = "<leader>cg"; cmd = "<cmd>Neogen<cr>"; desc = "Test"; }
];
opts = {
languages = {
python = {
template = {
annotation_convention = "reST";
};
};
};
};
cmd = [ "Neogen" ];
}
];
}

View File

@ -81,7 +81,7 @@ local on_attach_def = function(client, bufnr)
function()
require("telescope.builtin").lsp_type_definitions({ reuse_win = true })
end,
"Goto type defininition",
"Goto type definition",
},
r = { "<cmd>Telescope lsp_references<cr>", "Goto references" },
D = { vim.lsp.buf.declaration, "Goto declaration" },
@ -129,7 +129,6 @@ local servers = {
"gopls",
"nil_ls",
"nixd",
"pylsp",
"ruff_lsp",
"typst_lsp",
}
@ -137,6 +136,18 @@ for _, lsp in ipairs(servers) do
lspconfig_setup(lsp, {})
end
lspconfig_setup("pylsp", {
settings = {
pylsp = {
plugins = {
rope_autoimport = {
enabled = true,
},
},
},
},
})
lspconfig_setup("rust_analyzer", {
settings = {
["rust-analyzer"] = {

View File

@ -60,8 +60,8 @@ with builtins;
require('nvim-treesitter.configs').setup(final_opts)
'';
dependencies = [
{ plugin = nvim-ts-context-commentstring; }
{ plugin = nvim-treesitter-textobjects; }
{ plugin = nvim-ts-context-commentstring; opts = { }; }
];
}
{

View File

@ -35,6 +35,11 @@ with lib.my;
src = inputs.nvim-treesitter;
});
statuscol-nvim = prev.vimPlugins.statuscol-nvim.overrideAttrs (_: {
version = mkVersionInput inputs.statuscol-nvim;
src = inputs.statuscol-nvim;
});
# HACK: to fix error in nixpkgs version of nvim-lspconfig
nvim-lspconfig = prev.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
version = mkVersionInput inputs.nvim-lspconfig;

View File

@ -1,6 +1 @@
use flake
export PYTHONPATH="$(pwd)/src:$PYTHONPATH"
if [ ! -z $NIX_LD ]; then
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
fi
layout poetry
use nix

View File

@ -1,15 +0,0 @@
{
description = "Simple python flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ python3 poetry ];
};
};
};
}

View File

@ -0,0 +1,14 @@
{ pkgs ? import <nixpkgs> { } }:
let
poetry2nix = import (fetchTarball "https://github.com/nix-community/poetry2nix/archive/master.tar.gz") { };
project =
poetry2nix.mkPoetryApplication {
projectDir = ./.;
preferWheels = true;
};
in
pkgs.mkShell {
inputsFrom = [ project ];
packages = [ pkgs.poetry ];
}