Compare commits

..

1 commit

Author SHA1 Message Date
4be4a7979f
feat: add "ubuntu" config for containers 2024-12-16 14:08:48 +01:00
7 changed files with 46 additions and 98 deletions

10
.nix/flake.lock generated
View file

@ -2,12 +2,12 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1736012469,
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"revCount": 733374,
"lastModified": 1729665710,
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
"rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d",
"revCount": 696158,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.733374%2Brev-8f3e1f807051e32d8c95cd12b9b421623850a34d/01943a5d-98a8-75c0-9963-3a93900583fd/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.696158%2Brev-2768c7d042a37de65bb1b5b3268fc987e534c49d/0192bd28-d6c0-735c-ab86-8ab9d12f7d62/source.tar.gz"
},
"original": {
"type": "tarball",

12
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1736204492,
"narHash": "sha256-CoBPRgkUex9Iz6qGSzi/BFVUQjndB0PmME2B6eEyeCs=",
"lastModified": 1734093295,
"narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "20665c6efa83d71020c8730f26706258ba5c6b2a",
"rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1736012469,
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
"lastModified": 1734119587,
"narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
"type": "github"
},
"original": {

View file

@ -59,6 +59,27 @@
vimwikiPath = "~/vimwiki";
};
};
"ubuntu" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./shell
./git
./gpg
./neovim
./horsch.nix
];
extraSpecialArgs = {
user = "ubuntu";
userName = "Michael Mandl";
userEmail = "michael.mandl@horsch.com";
gpgSigningKey = "088ED38F036C7AF2";
gpgSSHKeys = [ "AEB2BF3FF9CF9529E9A3C6F1A202D21686FF9278" ];
theme = "dark";
vimwikiPath = "~/vimwiki";
};
};
};
};
}

View file

@ -44,8 +44,7 @@
merge.ff = false;
merge.tool = "nvim";
mergetool.nvim.cmd = "nvim -d $BASE $LOCAL $REMOTE $MERGED -c 'DiffviewOpen'";
mergetool.nvim.trustExitCode = false;
mergetool.nvim.cmd = "nvim -f -c \"Gdiffsplit!\" \"$MERGED\"";
mergetool.prompt = false;
pager.difftool = true;

View file

@ -55,7 +55,6 @@
vim-flog
git-blame-nvim
nvim-web-devicons # used by diffview-nvim
diffview-nvim
# snippets
friendly-snippets
@ -85,12 +84,6 @@
none-ls-nvim
lsp_lines-nvim
lsp-inlayhints-nvim
lspkind-nvim
# Copilot
copilot-lua
copilot-cmp
CopilotChat-nvim
# debugging
nvim-dap
@ -98,9 +91,6 @@
# vim-wiki
vimwiki
# firenvim
firenvim
];
withNodeJs = true;
@ -147,12 +137,8 @@
require("local_toggleterm")
require("local_notify")
require("local_comment")
if vim.g.started_by_firenvim ~= true then
require("local_lualine")
require("local_tabline")
end
require("local_lualine")
require("local_tabline")
require("local_indent-blankline")
require("local_gitsigns")
require("local_luasnip")
@ -172,18 +158,6 @@
require("nvim-autopairs").setup({})
require("neogen").setup({ snippet_engine = "luasnip" })
require("local_firenvim")
require("CopilotChat").setup()
require("diffview").setup({
view = {
merge_tool = {
layout = "diff4_mixed",
disable_diagnostics = true,
}
}
})
'';
};
};
@ -212,5 +186,4 @@
home.file.".config/nvim/lua/local_dap.lua".source = ./dap.lua;
home.file.".config/nvim/lua/local_illuminate.lua".source = ./illuminate.lua;
home.file.".config/nvim/lua/local_wilder.lua".source = ./wilder.lua;
home.file.".config/nvim/lua/local_firenvim.lua".source = ./firenvim.lua;
}

View file

@ -1,38 +0,0 @@
if vim.g.started_by_firenvim ~= true then
return
end
vim.g.firenvim_config = {
globalSettings = { alt = "all" },
localSettings = {
[".*"] = {
cmdline = "neovim",
content = "text",
priority = 0,
selector = "textarea",
takeover = "never"
}
}
}
vim.api.nvim_create_autocmd('UIEnter', {
callback = function()
local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client
if client ~= nil and client.name == "Firenvim" then
vim.o.laststatus = 0
end
end
})
vim.api.nvim_create_autocmd({ 'TextChanged', 'TextChangedI' }, {
callback = function()
if vim.g.timer_started == true then
return
end
vim.g.timer_started = true
vim.fn.timer_start(500, function()
vim.g.timer_started = false
vim.cmd('silent write')
end)
end
})

View file

@ -7,12 +7,6 @@ end
local cmp = require("cmp")
local luasnip = require("luasnip")
local copilot_lua = require("copilot")
local copilot_cmp = require("copilot_cmp")
local lspkind = require("lspkind")
copilot_lua.setup({})
copilot_cmp.setup({})
cmp.setup({
snippet = {
@ -21,7 +15,6 @@ cmp.setup({
end
},
sources = cmp.config.sources({
{ name = "copilot" },
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" },
{ name = "luasnip" },
@ -63,18 +56,18 @@ cmp.setup({
documentation = cmp.config.window.bordered(),
},
formatting = {
format = lspkind.cmp_format({
mode = "symbol",
maxwidth = {
menu = 50,
abbr = 50,
},
ellipsis_char = "...",
show_labelDetails = true,
symbol_map = {
Copilot = "",
fields = { "menu", "abbr", "kind" },
format = function(entry, item)
local menu_icon = {
nvim_lsp = "λ",
luasnip = "",
buffer = "Ω",
path = "🖿",
}
}),
item.menu = menu_icon[entry.source.name]
return item
end,
},
})