Merge remote-tracking branch 'origin/nixos' into nixos
This commit is contained in:
commit
05927d1ae6
9 changed files with 96 additions and 34 deletions
50
flake.lock
50
flake.lock
|
@ -513,6 +513,22 @@
|
||||||
"type": "github"
|
"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": {
|
"lowdown-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -616,17 +632,16 @@
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698364851,
|
"lastModified": 1701993865,
|
||||||
"narHash": "sha256-UQqC71YP6B5uOQ8HZRWQsbiMDKIROLhSNlnFPnDP27Y=",
|
"narHash": "sha256-2BksxNhmUG+MFCejvXeIPivJ8273r6aS5sqC4W8pjw8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "dacbb092b5d6e97127b3e57007474a5c47305164",
|
"rev": "3094e82f5b8b3ccf6ddd4917e881209faea35d90",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "dacbb092b5d6e97127b3e57007474a5c47305164",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -668,22 +683,23 @@
|
||||||
"nix-super": {
|
"nix-super": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
|
"libgit2": "libgit2",
|
||||||
"lowdown-src": "lowdown-src",
|
"lowdown-src": "lowdown-src",
|
||||||
"nixpkgs": "nixpkgs_7",
|
"nixpkgs": "nixpkgs_7",
|
||||||
"nixpkgs-regression": "nixpkgs-regression"
|
"nixpkgs-regression": "nixpkgs-regression"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697392285,
|
"lastModified": 1700941252,
|
||||||
"narHash": "sha256-1IBnF9IuStUWoAKJ74HNhV46+9Cbf/yZP6h6hJOJ1Cg=",
|
"narHash": "sha256-2c8miJcsG24YEtXOSjvgW0ES1ND5DpY+ymGPq3S56YE=",
|
||||||
"owner": "privatevoid-net",
|
"owner": "privatevoid-net",
|
||||||
"repo": "nix-super",
|
"repo": "nix-super",
|
||||||
"rev": "ba035e1ea339a97e6ba6a1dd79e0c0e334240234",
|
"rev": "c076362db8b438c921d9bbe196ede50205f788c6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "privatevoid-net",
|
"owner": "privatevoid-net",
|
||||||
"repo": "nix-super",
|
"repo": "nix-super",
|
||||||
"rev": "ba035e1ea339a97e6ba6a1dd79e0c0e334240234",
|
"rev": "c076362db8b438c921d9bbe196ede50205f788c6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1049,6 +1065,7 @@
|
||||||
"rofi-wayland": "rofi-wayland",
|
"rofi-wayland": "rofi-wayland",
|
||||||
"smartcolumn-nvim": "smartcolumn-nvim",
|
"smartcolumn-nvim": "smartcolumn-nvim",
|
||||||
"stable": "stable",
|
"stable": "stable",
|
||||||
|
"statuscol-nvim": "statuscol-nvim",
|
||||||
"telekasten-nvim": "telekasten-nvim",
|
"telekasten-nvim": "telekasten-nvim",
|
||||||
"timers": "timers"
|
"timers": "timers"
|
||||||
}
|
}
|
||||||
|
@ -1085,6 +1102,23 @@
|
||||||
"type": "github"
|
"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": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Programs
|
# 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.flake = false;
|
||||||
rofi-wayland.url = "github:lbonn/rofi/wayland";
|
rofi-wayland.url = "github:lbonn/rofi/wayland";
|
||||||
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
|
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
};
|
};
|
||||||
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/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";
|
nix-lazy-nvim.url = "git+https://git.moritzboeh.me/moritz/NixLazy.nvim";
|
||||||
nvim-lspconfig.flake = false;
|
nvim-lspconfig.flake = false;
|
||||||
nvim-lspconfig.url = "github:neovim/nvim-lspconfig";
|
nvim-lspconfig.url = "github:neovim/nvim-lspconfig";
|
||||||
|
@ -52,6 +52,8 @@
|
||||||
none-ls-nvim.url = "github:nvimtools/none-ls.nvim";
|
none-ls-nvim.url = "github:nvimtools/none-ls.nvim";
|
||||||
neotest-python.flake = false;
|
neotest-python.flake = false;
|
||||||
neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search";
|
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
|
# Hyprland
|
||||||
hypr-contrib.url = "github:hyprwm/contrib";
|
hypr-contrib.url = "github:hyprwm/contrib";
|
||||||
|
|
|
@ -316,5 +316,21 @@ with builtins;
|
||||||
cmd = [ "ConformInfo" "Format" ];
|
cmd = [ "ConformInfo" "Format" ];
|
||||||
conf = readFile ./lua/conform.lua;
|
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" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ local on_attach_def = function(client, bufnr)
|
||||||
function()
|
function()
|
||||||
require("telescope.builtin").lsp_type_definitions({ reuse_win = true })
|
require("telescope.builtin").lsp_type_definitions({ reuse_win = true })
|
||||||
end,
|
end,
|
||||||
"Goto type defininition",
|
"Goto type definition",
|
||||||
},
|
},
|
||||||
r = { "<cmd>Telescope lsp_references<cr>", "Goto references" },
|
r = { "<cmd>Telescope lsp_references<cr>", "Goto references" },
|
||||||
D = { vim.lsp.buf.declaration, "Goto declaration" },
|
D = { vim.lsp.buf.declaration, "Goto declaration" },
|
||||||
|
@ -129,7 +129,6 @@ local servers = {
|
||||||
"gopls",
|
"gopls",
|
||||||
"nil_ls",
|
"nil_ls",
|
||||||
"nixd",
|
"nixd",
|
||||||
"pylsp",
|
|
||||||
"ruff_lsp",
|
"ruff_lsp",
|
||||||
"typst_lsp",
|
"typst_lsp",
|
||||||
}
|
}
|
||||||
|
@ -137,6 +136,18 @@ for _, lsp in ipairs(servers) do
|
||||||
lspconfig_setup(lsp, {})
|
lspconfig_setup(lsp, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
lspconfig_setup("pylsp", {
|
||||||
|
settings = {
|
||||||
|
pylsp = {
|
||||||
|
plugins = {
|
||||||
|
rope_autoimport = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
lspconfig_setup("rust_analyzer", {
|
lspconfig_setup("rust_analyzer", {
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
|
|
|
@ -60,8 +60,8 @@ with builtins;
|
||||||
require('nvim-treesitter.configs').setup(final_opts)
|
require('nvim-treesitter.configs').setup(final_opts)
|
||||||
'';
|
'';
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ plugin = nvim-ts-context-commentstring; }
|
|
||||||
{ plugin = nvim-treesitter-textobjects; }
|
{ plugin = nvim-treesitter-textobjects; }
|
||||||
|
{ plugin = nvim-ts-context-commentstring; opts = { }; }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,6 +35,11 @@ with lib.my;
|
||||||
src = inputs.nvim-treesitter;
|
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
|
# HACK: to fix error in nixpkgs version of nvim-lspconfig
|
||||||
nvim-lspconfig = prev.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
|
nvim-lspconfig = prev.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
|
||||||
version = mkVersionInput inputs.nvim-lspconfig;
|
version = mkVersionInput inputs.nvim-lspconfig;
|
||||||
|
|
|
@ -1,6 +1 @@
|
||||||
use flake
|
use nix
|
||||||
export PYTHONPATH="$(pwd)/src:$PYTHONPATH"
|
|
||||||
if [ ! -z $NIX_LD ]; then
|
|
||||||
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
|
|
||||||
fi
|
|
||||||
layout poetry
|
|
||||||
|
|
|
@ -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 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
14
templates/python/shell.nix
Normal file
14
templates/python/shell.nix
Normal 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 ];
|
||||||
|
}
|
Loading…
Reference in a new issue