Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos
This commit is contained in:
commit
053f516175
16 changed files with 330 additions and 244 deletions
24
modules/programs/gitbutler/default.nix
Normal file
24
modules/programs/gitbutler/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
|
||||
cfg = config.my.programs.gitbutler;
|
||||
in
|
||||
{
|
||||
options.my.programs.gitbutler = {
|
||||
enable = mkEnableOption "gitbutler";
|
||||
package = mkOption {
|
||||
default = pkgs.callPackage ./package.nix { };
|
||||
type = types.package;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
};
|
||||
}
|
||||
16
modules/programs/gitbutler/package.nix
Normal file
16
modules/programs/gitbutler/package.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ fetchzip, appimageTools }:
|
||||
|
||||
let
|
||||
pname = "git-butler";
|
||||
version = "0.12.4";
|
||||
buildNum = "994";
|
||||
|
||||
srcZipped = fetchzip {
|
||||
url = "https://releases.gitbutler.com/releases/release/${version}-${buildNum}/linux/x86_64/git-butler_${version}_amd64.AppImage.tar.gz";
|
||||
hash = "sha256-+QP+H0bVSLbobv/W6lFBbl08RnwKvG8BVo68bwMrAzM=";
|
||||
};
|
||||
in
|
||||
appimageTools.wrapType2 {
|
||||
inherit pname version;
|
||||
src = "${srcZipped}/git-butler_${version}_amd64.AppImage";
|
||||
}
|
||||
|
|
@ -119,6 +119,13 @@ in
|
|||
force_default_wallpaper = 0
|
||||
}
|
||||
|
||||
xwayland {
|
||||
force_zero_scaling = true
|
||||
}
|
||||
|
||||
# scale non native wayland gtk applications
|
||||
env = GDK_SCALE,1.2
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# Firefox Sharing Indicator
|
||||
${mkRules ["float" "move 49% 40" "noborder"] ["title:^(.*Sharing Indicator.*)$"]}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.nvim;
|
||||
inherit (lib) mkEnableOption mkIf readFile;
|
||||
in
|
||||
{
|
||||
imports = lib.my.listModulesRec ./plugins;
|
||||
|
|
|
|||
|
|
@ -1,26 +1,28 @@
|
|||
{ pkgs, lib, inputs, ... }:
|
||||
|
||||
with builtins;
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
in
|
||||
{
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
|
||||
{
|
||||
plugin = oil-nvim;
|
||||
plugin = pkgs.vimPlugins.oil-nvim;
|
||||
lazy = false;
|
||||
opts = { };
|
||||
dependencies = [{ plugin = nvim-web-devicons; }];
|
||||
dependencies = [{ plugin = pkgs.vimPlugins.nvim-web-devicons; }];
|
||||
}
|
||||
{
|
||||
plugin = lualine-nvim;
|
||||
plugin = pkgs.vimPlugins.lualine-nvim;
|
||||
opts = { };
|
||||
dependencies = [{ plugin = nvim-web-devicons; }];
|
||||
dependencies = [{ plugin = pkgs.vimPlugins.nvim-web-devicons; }];
|
||||
}
|
||||
{
|
||||
plugin = mini-nvim;
|
||||
plugin = pkgs.vimPlugins.mini-nvim;
|
||||
lazy = false;
|
||||
conf = readFile ./lua/mini-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
plugin = pkgs.vimPlugins.nvim-cmp;
|
||||
keys = [
|
||||
{ key = "<leader>tc"; cmd = "<cmd>CmpToggle<cr>"; desc = "Toggle Cmp sources"; }
|
||||
];
|
||||
|
|
@ -28,26 +30,43 @@ with builtins;
|
|||
event = [ "InsertEnter" ];
|
||||
dependencies = [
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
plugin = pkgs.vimPlugins.nvim-autopairs;
|
||||
opts = { };
|
||||
}
|
||||
{ plugin = cmp-async-path; }
|
||||
{ plugin = cmp-buffer; }
|
||||
{ plugin = cmp-cmdline; }
|
||||
{ plugin = cmp-nvim-lsp; }
|
||||
{ plugin = cmp_luasnip; }
|
||||
{ plugin = cmp-spell; }
|
||||
{ plugin = cmp-nvim-lsp-signature-help; }
|
||||
{ plugin = friendly-snippets; }
|
||||
{ plugin = lspkind-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-async-path; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-buffer; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-cmdline; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp; }
|
||||
{ plugin = pkgs.vimPlugins.cmp_luasnip; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-spell; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp-signature-help; }
|
||||
{
|
||||
plugin = luasnip;
|
||||
plugin = pkgs.vimPlugins.copilot-cmp;
|
||||
opts = { };
|
||||
dependencies = [
|
||||
{
|
||||
plugin = pkgs.vimPlugins.copilot-lua;
|
||||
opts = {
|
||||
suggestion = { enabled = false; };
|
||||
panel = { enabled = false; };
|
||||
};
|
||||
conf = /* lua */ ''
|
||||
require("copilot").setup(opts)
|
||||
vim.cmd("Copilot disable")
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
{ plugin = pkgs.vimPlugins.friendly-snippets; }
|
||||
{ plugin = pkgs.vimPlugins.lspkind-nvim; }
|
||||
{
|
||||
plugin = pkgs.vimPlugins.luasnip;
|
||||
conf = readFile ./lua/luasnip.lua;
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = direnv-vim;
|
||||
plugin = pkgs.vimPlugins.direnv-vim;
|
||||
lazy = false;
|
||||
}
|
||||
{
|
||||
|
|
@ -60,25 +79,26 @@ with builtins;
|
|||
dependencies = [
|
||||
{
|
||||
# TODO: add all required tools to neovim or silence warnings
|
||||
plugin = pkgs.vimPlugins.null-ls-nvim.overrideAttrs (_: {
|
||||
version = lib.my.mkVersionInput inputs.none-ls-nvim;
|
||||
src = inputs.none-ls-nvim;
|
||||
});
|
||||
plugin = pkgs.vimPlugins.none-ls-nvim;
|
||||
conf = readFile ./lua/null-ls-nvim.lua;
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = plenary-nvim; }
|
||||
{
|
||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "none-ls-shellcheck.nvim";
|
||||
version = lib.my.mkVersionInput inputs.none-ls-shellcheck-nvim;
|
||||
src = inputs.none-ls-shellcheck-nvim;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = lsp_lines-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.lsp_lines-nvim; }
|
||||
{
|
||||
plugin = inc-rename-nvim;
|
||||
plugin = pkgs.vimPlugins.inc-rename-nvim;
|
||||
opts = {
|
||||
input_buffer_type = "dressing";
|
||||
};
|
||||
dependencies = [
|
||||
{ plugin = dressing-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.dressing-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
|
|
@ -91,7 +111,7 @@ with builtins;
|
|||
];
|
||||
}
|
||||
{
|
||||
plugin = vim-fugitive;
|
||||
plugin = pkgs.vimPlugins.vim-fugitive;
|
||||
cmd = [
|
||||
"G"
|
||||
"Git"
|
||||
|
|
@ -122,11 +142,11 @@ with builtins;
|
|||
];
|
||||
}
|
||||
{
|
||||
plugin = vim-tmux-navigator;
|
||||
plugin = pkgs.vimPlugins.vim-tmux-navigator;
|
||||
event = [ "VeryLazy" ];
|
||||
}
|
||||
{
|
||||
plugin = nvim-lastplace;
|
||||
plugin = pkgs.vimPlugins.nvim-lastplace;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = {
|
||||
lastplace_ignore_buftype = [ "quickfix" "nofile" "help" ];
|
||||
|
|
@ -135,7 +155,7 @@ with builtins;
|
|||
};
|
||||
}
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
plugin = pkgs.vimPlugins.telescope-nvim;
|
||||
cmd = [ "Telescope" ];
|
||||
conf = builtins.readFile ./lua/telescope.lua;
|
||||
keys = [
|
||||
|
|
@ -159,31 +179,31 @@ with builtins;
|
|||
{ key = "<leader>fr"; cmd = "<cmd>Telescope oldfiles<cr>"; desc = "Recent files"; }
|
||||
];
|
||||
dependencies = [
|
||||
{ plugin = plenary-nvim; }
|
||||
{ plugin = telescope-fzf-native-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.plenary-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.telescope-fzf-native-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = vim-startuptime;
|
||||
plugin = pkgs.vimPlugins.vim-startuptime;
|
||||
cmd = [ "StartupTime" ];
|
||||
conf = readFile ./lua/vim-startuptime.lua;
|
||||
}
|
||||
{
|
||||
plugin = typst-vim;
|
||||
plugin = pkgs.vimPlugins.typst-vim;
|
||||
ft = [ "typst" "typ" ];
|
||||
}
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
plugin = pkgs.vimPlugins.comment-nvim;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = { };
|
||||
}
|
||||
{
|
||||
plugin = nvim-surround;
|
||||
plugin = pkgs.vimPlugins.nvim-surround;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = { };
|
||||
}
|
||||
{
|
||||
plugin = conform-nvim;
|
||||
plugin = pkgs.vimPlugins.conform-nvim;
|
||||
keys = [
|
||||
{ key = "="; cmd = "<cmd>lua require('conform').format()<cr>"; desc = "format buffer"; mode = [ "n" "v" ]; }
|
||||
];
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ local null_ls = require("null-ls")
|
|||
null_ls.setup({
|
||||
sources = {
|
||||
-- Code actions
|
||||
null_ls.builtins.code_actions.shellcheck,
|
||||
require("none-ls-shellcheck.code_actions"),
|
||||
null_ls.builtins.code_actions.statix,
|
||||
-- Diagnostics
|
||||
null_ls.builtins.diagnostics.checkmake,
|
||||
null_ls.builtins.diagnostics.deadnix,
|
||||
null_ls.builtins.diagnostics.dotenv_linter,
|
||||
null_ls.builtins.diagnostics.fish,
|
||||
null_ls.builtins.diagnostics.shellcheck,
|
||||
require("none-ls-shellcheck.diagnostics"),
|
||||
null_ls.builtins.diagnostics.statix,
|
||||
null_ls.builtins.diagnostics.trail_space,
|
||||
null_ls.builtins.diagnostics.yamllint,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ cmp.setup({
|
|||
mode = "symbol", -- show only symbol annotations
|
||||
maxwidth = 50, -- prevent the popup from showing more than provided characters
|
||||
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
|
||||
symbol_map = {
|
||||
Copilot = "",
|
||||
},
|
||||
}),
|
||||
},
|
||||
enabled = function()
|
||||
|
|
@ -59,14 +62,13 @@ cmp.setup({
|
|||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "async_path", priority = 1 },
|
||||
{ name = "nvim_lsp", priority = 2 },
|
||||
{ name = "nvim_lsp_signature_help", priority = 3 },
|
||||
{ name = "luasnip", priority = 4 },
|
||||
}, {
|
||||
{ name = "async_path" },
|
||||
{ name = "buffer" },
|
||||
{ name = "spell" },
|
||||
{ priority = 1, name = "async_path" },
|
||||
{ priority = 1, name = "buffer" },
|
||||
{ priority = 1, name = "spell" },
|
||||
{ priority = 2, name = "nvim_lsp" },
|
||||
{ priority = 3, name = "copilot" },
|
||||
{ priority = 3, name = "nvim_lsp_signature_help" },
|
||||
{ priority = 4, name = "luasnip" },
|
||||
}),
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,6 @@ local servers = {
|
|||
"gleam",
|
||||
"gopls",
|
||||
"nil_ls",
|
||||
"nixd",
|
||||
"pylsp",
|
||||
"ruff_lsp",
|
||||
"templ",
|
||||
|
|
@ -134,6 +133,27 @@ for _, lsp in ipairs(servers) do
|
|||
lspconfig_setup(lsp, {})
|
||||
end
|
||||
|
||||
lspconfig_setup("nixd", {
|
||||
settings = {
|
||||
nixd = {
|
||||
nixpkgs = {
|
||||
expr = "import <nixpkgs> { }",
|
||||
},
|
||||
options = {
|
||||
nixos = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.nixos-desktop.options',
|
||||
},
|
||||
["flake-parts"] = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).debug.options',
|
||||
},
|
||||
["flake-parts2"] = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).currentSystem.options',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Add templ filetype
|
||||
vim.filetype.add({ extension = { templ = "templ" } })
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||
local builtin = require("statuscol.builtin")
|
||||
require("statuscol").setup({
|
||||
segments = {
|
||||
{
|
||||
sign = { name = { ".*" }, auto = true },
|
||||
click = "v:lua.ScSa",
|
||||
},
|
||||
{
|
||||
text = { builtin.lnumfunc },
|
||||
click = "v:lua.ScLa",
|
||||
},
|
||||
{
|
||||
sign = { namespace = { "gitsigns*" }, auto = true },
|
||||
click = "v:lua.ScSa",
|
||||
},
|
||||
{
|
||||
text = { builtin.foldfunc, " " },
|
||||
click = "v:lua.ScFa",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -4,8 +4,10 @@
|
|||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) range filterAttrs attrNames foldl' head tail mkOption mkEnableOption intersectLists genAttrs flip getAttr;
|
||||
inherit (lib.types) listOf enum package;
|
||||
|
||||
cfg = config.my.programs.python;
|
||||
|
||||
pythonVersions = map (version: "3${toString version}") (range 8 13);
|
||||
|
|
@ -23,7 +25,7 @@ let
|
|||
enable = mkEnableOption (toString version);
|
||||
pythonPackages = mkOption {
|
||||
default = [ ];
|
||||
type = with types; listOf (enum (pythonPackages version));
|
||||
type = listOf (enum (pythonPackages version));
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
@ -32,11 +34,11 @@ in
|
|||
versions = genAttrs pythonVersions versionOpts;
|
||||
defaultPackages = mkOption {
|
||||
default = [ ];
|
||||
type = with types; listOf (enum commonPackages);
|
||||
type = listOf (enum commonPackages);
|
||||
};
|
||||
extraPackages = mkOption {
|
||||
default = [ ];
|
||||
type = with types; listOf package;
|
||||
type = listOf package;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue