Merge remote-tracking branch 'origin/nixos' into nixos
This commit is contained in:
commit
596ec0e81d
10 changed files with 139 additions and 445 deletions
85
flake.lock
85
flake.lock
|
@ -55,38 +55,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cmp-async-path": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1673896803,
|
|
||||||
"narHash": "sha256-dgAiVbdMiKjiKWk+dJf/Zz8T20+D4OalGH5dTzYi5aM=",
|
|
||||||
"owner": "FelipeLema",
|
|
||||||
"repo": "cmp-async-path",
|
|
||||||
"rev": "d8229a93d7b71f22c66ca35ac9e6c6cd850ec61d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "FelipeLema",
|
|
||||||
"repo": "cmp-async-path",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"copilot-lua": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688190439,
|
|
||||||
"narHash": "sha256-lD9FdbKKZ6d/BjIfqp0Ust2hqSYNLpCFWxuaKUO9qLs=",
|
|
||||||
"owner": "zbirenbaum",
|
|
||||||
"repo": "copilot.lua",
|
|
||||||
"rev": "e48bd7020a98be217d85c006a298656294fd6210",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "zbirenbaum",
|
|
||||||
"repo": "copilot.lua",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"darwin": {
|
"darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -351,6 +319,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"hmts-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1691525513,
|
||||||
|
"narHash": "sha256-il5m+GlNt0FzZjefl1q8ZxWHg0+gQps0vigt+eoIy8A=",
|
||||||
|
"owner": "calops",
|
||||||
|
"repo": "hmts.nvim",
|
||||||
|
"rev": "594dd17c870afb7f6517723c8963f6eb144e3c0d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "calops",
|
||||||
|
"repo": "hmts.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -470,22 +454,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"leap-spooky-nvim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1687792124,
|
|
||||||
"narHash": "sha256-EPqbsG7KFHdnbW430+BSrPeOoVy99KtIC8OpFbV1ycw=",
|
|
||||||
"owner": "ggandor",
|
|
||||||
"repo": "leap-spooky.nvim",
|
|
||||||
"rev": "e003f2aa376190148f2e7731a60c89239335013c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "ggandor",
|
|
||||||
"repo": "leap-spooky.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lowdown-src": {
|
"lowdown-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -502,22 +470,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lspsaga-nvim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689849495,
|
|
||||||
"narHash": "sha256-tD3UxJUtYoxUMTFF4gfKChVfI5SxZQ2C12WRF73Ahc4=",
|
|
||||||
"owner": "glepnir",
|
|
||||||
"repo": "lspsaga.nvim",
|
|
||||||
"rev": "0c20101ac826961a7052c4ad9d5f7f791b4adab1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "glepnir",
|
|
||||||
"repo": "lspsaga.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"master": {
|
"master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689880801,
|
"lastModified": 1689880801,
|
||||||
|
@ -896,15 +848,12 @@
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"arkenfox-userjs": "arkenfox-userjs",
|
"arkenfox-userjs": "arkenfox-userjs",
|
||||||
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
|
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
|
||||||
"cmp-async-path": "cmp-async-path",
|
|
||||||
"copilot-lua": "copilot-lua",
|
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
"hmts-nvim": "hmts-nvim",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"hypr-contrib": "hypr-contrib",
|
"hypr-contrib": "hypr-contrib",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"hyprpaper": "hyprpaper",
|
"hyprpaper": "hyprpaper",
|
||||||
"leap-spooky-nvim": "leap-spooky-nvim",
|
|
||||||
"lspsaga-nvim": "lspsaga-nvim",
|
|
||||||
"master": "master",
|
"master": "master",
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nil": "nil",
|
"nil": "nil",
|
||||||
|
|
15
flake.nix
15
flake.nix
|
@ -35,27 +35,18 @@
|
||||||
# Neovim
|
# Neovim
|
||||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||||
|
|
||||||
cmp-async-path.url = "github:FelipeLema/cmp-async-path";
|
|
||||||
cmp-async-path.flake = false;
|
|
||||||
|
|
||||||
copilot-lua.flake = false;
|
|
||||||
copilot-lua.url = "github:zbirenbaum/copilot.lua";
|
|
||||||
|
|
||||||
lspsaga-nvim.flake = false;
|
|
||||||
lspsaga-nvim.url = "github:glepnir/lspsaga.nvim";
|
|
||||||
|
|
||||||
nvim-treesitter-textsubjects.flake = false;
|
nvim-treesitter-textsubjects.flake = false;
|
||||||
nvim-treesitter-textsubjects.url = "github:RRethy/nvim-treesitter-textsubjects";
|
nvim-treesitter-textsubjects.url = "github:RRethy/nvim-treesitter-textsubjects";
|
||||||
|
|
||||||
smartcolumn-nvim.flake = false;
|
smartcolumn-nvim.flake = false;
|
||||||
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
|
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
|
||||||
|
|
||||||
leap-spooky-nvim.flake = false;
|
|
||||||
leap-spooky-nvim.url = "github:ggandor/leap-spooky.nvim";
|
|
||||||
|
|
||||||
telekasten-nvim.flake = false;
|
telekasten-nvim.flake = false;
|
||||||
telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
|
telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
|
||||||
|
|
||||||
|
hmts-nvim.flake = false;
|
||||||
|
hmts-nvim.url = "github:calops/hmts.nvim";
|
||||||
|
|
||||||
# Hyprland
|
# Hyprland
|
||||||
hypr-contrib.url = "github:hyprwm/contrib";
|
hypr-contrib.url = "github:hyprwm/contrib";
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
|
|
@ -55,7 +55,7 @@ in
|
||||||
cat = "bat";
|
cat = "bat";
|
||||||
rm = "rm -i";
|
rm = "rm -i";
|
||||||
mv = "mv -i";
|
mv = "mv -i";
|
||||||
cd = "z";
|
cd = "__zoxide_z";
|
||||||
|
|
||||||
nixos-switch = nom-system-command "sudo nixos-rebuild switch --flake ~/.dotfiles";
|
nixos-switch = nom-system-command "sudo nixos-rebuild switch --flake ~/.dotfiles";
|
||||||
nixos-boot = nom-system-command "sudo nixos-rebuild boot --flake ~/.dotfiles";
|
nixos-boot = nom-system-command "sudo nixos-rebuild boot --flake ~/.dotfiles";
|
||||||
|
@ -167,7 +167,12 @@ in
|
||||||
"--bind alt-j:preview-down,alt-k:preview-up"
|
"--bind alt-j:preview-down,alt-k:preview-up"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
zoxide.enable = true;
|
zoxide = {
|
||||||
|
enable = true;
|
||||||
|
options = [
|
||||||
|
"--cmd c"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
home = {
|
home = {
|
||||||
username = "moritz";
|
username = "moritz";
|
||||||
|
|
|
@ -43,26 +43,29 @@ in
|
||||||
# visual mode, but due to fish_cursor_default, is redundant here
|
# visual mode, but due to fish_cursor_default, is redundant here
|
||||||
set fish_cursor_visual block
|
set fish_cursor_visual block
|
||||||
|
|
||||||
|
# Completions
|
||||||
|
complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")'
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
${exportedVariables}
|
${exportedVariables}
|
||||||
'';
|
'';
|
||||||
functions = {
|
functions = {
|
||||||
gi = with pkgs; ''
|
gi = ''
|
||||||
set url https://www.gitignore.io/api
|
set url https://www.gitignore.io/api
|
||||||
|
|
||||||
if test (count $argv) -eq 0
|
if test (count $argv) -eq 0
|
||||||
set choice ( curl -sL $url/list \
|
set choice ( curl -sL $url/list \
|
||||||
| string split "," \
|
| string split "," \
|
||||||
| ${fzf}/bin/fzf -m \
|
| ${getExe pkgs.fzf} -m \
|
||||||
| string join "," )
|
| string join "," )
|
||||||
else
|
else
|
||||||
set choice (string join "," $argv[1..])
|
set choice (string join "," $argv[1..])
|
||||||
end
|
end
|
||||||
|
|
||||||
if ${gum}/bin/gum confirm "Overwrite current .gitignore?"
|
if ${getExe pkgs.gum} confirm "Overwrite current .gitignore?"
|
||||||
${curl}/bin/curl -sL $url/$choice > .gitignore
|
${getExe pkgs.curl} -sL $url/$choice > .gitignore
|
||||||
else
|
else
|
||||||
${curl}/bin/curl -sL $url/$choice >> .gitignore
|
${getExe pkgs.curl} -sL $url/$choice >> .gitignore
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
fish_greeting = "";
|
fish_greeting = "";
|
||||||
|
|
|
@ -12,14 +12,8 @@ let
|
||||||
id = x: x;
|
id = x: x;
|
||||||
listToString = sep: f: list: ''{ ${concatStringsSep sep (map f list)} }'';
|
listToString = sep: f: list: ''{ ${concatStringsSep sep (map f list)} }'';
|
||||||
listToStringOneLine = listToString ", ";
|
listToStringOneLine = listToString ", ";
|
||||||
listToStringMultiLine = listToString ",\n";
|
listToStringMultiLine' = listToString ",\n" id;
|
||||||
keybinding =
|
keybinding = { key, cmd, func, mode, desc }:
|
||||||
{ key
|
|
||||||
, cmd
|
|
||||||
, func
|
|
||||||
, mode
|
|
||||||
, desc
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
cmdString =
|
cmdString =
|
||||||
if cmd != null
|
if cmd != null
|
||||||
|
@ -30,42 +24,30 @@ let
|
||||||
then func
|
then func
|
||||||
else abort "Either cmd or function must be set"
|
else abort "Either cmd or function must be set"
|
||||||
);
|
);
|
||||||
|
descString = optionalString (desc != null) "desc = ${quote desc},";
|
||||||
in
|
in
|
||||||
''{ ${quote key}, ${cmdString}, mode = ${quote mode}, ${optionalString (desc != null) "desc = ${quote desc},"} }'';
|
''{ ${quote key}, ${cmdString}, mode = ${quote mode}, ${descString} }'';
|
||||||
lazySpecFromPlugin =
|
lazySpecFromPlugin =
|
||||||
{ plugin
|
{ plugin, dependencies, init, conf, lazy, event, enabled, cmd, ft, priority, keys }:
|
||||||
, dependencies
|
listToStringMultiLine'
|
||||||
, init
|
|
||||||
, conf
|
|
||||||
, lazy
|
|
||||||
, event
|
|
||||||
, enabled
|
|
||||||
, cmd
|
|
||||||
, ft
|
|
||||||
, priority
|
|
||||||
, keys
|
|
||||||
}:
|
|
||||||
listToStringMultiLine id
|
|
||||||
([
|
([
|
||||||
"dir = ${quote plugin}"
|
"dir = ${quote plugin}"
|
||||||
"name = ${quote (getName plugin)}"
|
"name = ${quote (getName plugin)}"
|
||||||
]
|
]
|
||||||
++ (optional (lazy != null) "lazy = ${boolToString lazy}")
|
++ (optional (lazy != null) "lazy = ${boolToString lazy}")
|
||||||
++ (optional (!enabled) "enabled = ${boolToString enabled}")
|
++ (optional (!enabled) "enabled = ${boolToString enabled}")
|
||||||
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine id (map lazySpecFromPlugin dependencies)}")
|
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine' (map lazySpecFromPlugin dependencies)}")
|
||||||
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
|
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
|
||||||
++ (optional (conf != null) "config = function(plugin, opts)\n${toString conf}\nend")
|
++ (optional (conf != null) "config = function(plugin, opts)\n${toString conf}\nend")
|
||||||
++ (optional (keys != [ ]) "keys = ${listToStringMultiLine id (map keybinding keys)}")
|
++ (optional (keys != [ ]) "keys = ${listToStringMultiLine' (map keybinding keys)}")
|
||||||
++ (optional (event != [ ]) "event = ${listToStringOneLine quote event}")
|
++ (optional (event != [ ]) "event = ${listToStringOneLine quote event}")
|
||||||
++ (optional (cmd != [ ]) "cmd = ${listToStringOneLine quote cmd}")
|
++ (optional (cmd != [ ]) "cmd = ${listToStringOneLine quote cmd}")
|
||||||
++ (optional (ft != [ ]) "ft = ${listToStringOneLine quote ft}")
|
++ (optional (ft != [ ]) "ft = ${listToStringOneLine quote ft}")
|
||||||
++ (optional (priority != null) "priority = ${toString priority}")
|
++ (optional (priority != null) "priority = ${toString priority}")
|
||||||
);
|
);
|
||||||
lazySpecs = listToStringMultiLine id (map lazySpecFromPlugin cfg.plugins);
|
lazySpecs = listToStringMultiLine' (map lazySpecFromPlugin cfg.plugins);
|
||||||
lazy = ''
|
lazy = /* lua */ ''
|
||||||
require("lazy").setup({
|
require("lazy").setup(${lazySpecs})
|
||||||
${lazySpecs}
|
|
||||||
})
|
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -213,7 +195,17 @@ in
|
||||||
else neovide
|
else neovide
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
xdg.configFile."nvim/init.lua" = {
|
||||||
|
source =
|
||||||
|
let
|
||||||
|
text = lib.concatLines [ (builtins.readFile ./options.lua) lazy ];
|
||||||
|
in
|
||||||
|
pkgs.runCommand "init.lua" { inherit text; } ''
|
||||||
|
touch $out
|
||||||
|
echo -n "$text" > $out
|
||||||
|
${getExe pkgs.stylua} $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.neovim-nightly;
|
package = pkgs.neovim-nightly;
|
||||||
|
@ -221,7 +213,6 @@ in
|
||||||
vimdiffAlias = true;
|
vimdiffAlias = true;
|
||||||
withNodeJs = true;
|
withNodeJs = true;
|
||||||
withPython3 = true;
|
withPython3 = true;
|
||||||
extraLuaConfig = lib.concatLines [ (builtins.readFile ./options.lua) lazy ];
|
|
||||||
extraPython3Packages = ps:
|
extraPython3Packages = ps:
|
||||||
let
|
let
|
||||||
plugins = map (getAttr "plugin") cfg.plugins;
|
plugins = map (getAttr "plugin") cfg.plugins;
|
||||||
|
|
|
@ -20,7 +20,6 @@ with builtins;
|
||||||
{ key = "="; cmd = "<cmd>Format<cr>"; desc = "format (formatter)"; }
|
{ key = "="; cmd = "<cmd>Format<cr>"; desc = "format (formatter)"; }
|
||||||
];
|
];
|
||||||
conf = readFile ./formatter-nvim.lua;
|
conf = readFile ./formatter-nvim.lua;
|
||||||
dependencies = [{ plugin = which-key-nvim; }];
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = oil-nvim;
|
plugin = oil-nvim;
|
||||||
|
@ -36,12 +35,6 @@ with builtins;
|
||||||
lazy = false;
|
lazy = false;
|
||||||
conf = readFile ./mini-nvim.lua;
|
conf = readFile ./mini-nvim.lua;
|
||||||
}
|
}
|
||||||
{
|
|
||||||
plugin = noice-nvim;
|
|
||||||
lazy = false;
|
|
||||||
conf = readFile ./noice-nvim.lua;
|
|
||||||
dependencies = [{ plugin = nui-nvim; }];
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
plugin = trouble-nvim;
|
plugin = trouble-nvim;
|
||||||
keys = [
|
keys = [
|
||||||
|
@ -54,7 +47,7 @@ with builtins;
|
||||||
{ key = "<leader>st"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
{ key = "<leader>st"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
||||||
{
|
{
|
||||||
key = "[q";
|
key = "[q";
|
||||||
func = ''function()
|
func = /* lua */ ''function()
|
||||||
if require("trouble").is_open() then
|
if require("trouble").is_open() then
|
||||||
require("trouble").previous({ skip_groups = true, jump = true })
|
require("trouble").previous({ skip_groups = true, jump = true })
|
||||||
else
|
else
|
||||||
|
@ -65,7 +58,7 @@ with builtins;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "]q";
|
key = "]q";
|
||||||
func = ''function()
|
func = /* lua */ ''function()
|
||||||
if require("trouble").is_open() then
|
if require("trouble").is_open() then
|
||||||
require("trouble").next({ skip_groups = true, jump = true })
|
require("trouble").next({ skip_groups = true, jump = true })
|
||||||
else
|
else
|
||||||
|
@ -130,26 +123,31 @@ with builtins;
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{ plugin = which-key-nvim; }
|
{ plugin = which-key-nvim; }
|
||||||
{ plugin = lspkind-nvim; }
|
|
||||||
{ plugin = lsp_lines-nvim; }
|
{ plugin = lsp_lines-nvim; }
|
||||||
{
|
|
||||||
plugin = lspsaga-nvim-original;
|
|
||||||
dependencies = [
|
|
||||||
{ plugin = nvim-web-devicons; }
|
|
||||||
{ plugin = nvim-treesitter.withAllGrammars; }
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
plugin = nvim-ufo;
|
plugin = nvim-ufo;
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ plugin = promise-async; }
|
{ plugin = promise-async; }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
plugin = neodev-nvim;
|
||||||
|
conf = /* lua */ ''
|
||||||
|
require("neodev").setup({
|
||||||
|
override = function(root_dir, library)
|
||||||
|
if root_dir:find("/home/moritz/.dotfiles/", 1, true) == 1 then
|
||||||
|
library.enabled = true
|
||||||
|
library.plugins = true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = [ "VeryLazy" ];
|
|
||||||
plugin = vim-fugitive;
|
plugin = vim-fugitive;
|
||||||
|
event = [ "VeryLazy" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = vim-tmux-navigator;
|
plugin = vim-tmux-navigator;
|
||||||
|
@ -214,7 +212,7 @@ with builtins;
|
||||||
{
|
{
|
||||||
plugin = comment-nvim;
|
plugin = comment-nvim;
|
||||||
event = [ "BufReadPost" "BufNewFile" ];
|
event = [ "BufReadPost" "BufNewFile" ];
|
||||||
conf = ''
|
conf = /* lua */ ''
|
||||||
require("Comment").setup()
|
require("Comment").setup()
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -232,7 +230,7 @@ with builtins;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = markdown-preview-nvim;
|
plugin = markdown-preview-nvim;
|
||||||
lazy = false;
|
ft = [ "md" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = coq_nvim;
|
plugin = coq_nvim;
|
||||||
|
@ -257,16 +255,24 @@ with builtins;
|
||||||
{
|
{
|
||||||
plugin = nvim-surround;
|
plugin = nvim-surround;
|
||||||
event = [ "BufReadPost" "BufNewFile" ];
|
event = [ "BufReadPost" "BufNewFile" ];
|
||||||
conf = ''
|
conf = /* lua */ ''
|
||||||
require("nvim-surround").setup({})
|
require("nvim-surround").setup({})
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = nvim-treesitter-context;
|
plugin = nvim-treesitter-context;
|
||||||
event = [ "BufReadPost" "BufNewFile" ];
|
event = [ "BufReadPost" "BufNewFile" ];
|
||||||
conf = ''
|
conf = /* lua */ ''
|
||||||
require("treesitter-context").setup({})
|
require("treesitter-context").setup({})
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
plugin = dressing-nvim;
|
||||||
|
event = [ "VeryLazy" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = hmts-nvim;
|
||||||
|
ft = [ "nix" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,53 +53,68 @@ capabilities.textDocument.foldingRange = {
|
||||||
}
|
}
|
||||||
require("ufo").setup()
|
require("ufo").setup()
|
||||||
|
|
||||||
require("lspsaga").setup({
|
|
||||||
symbol_in_winbar = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
lightbulb = {
|
|
||||||
enable = false,
|
|
||||||
enable_in_insert = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local on_attach_def = function(_, bufnr)
|
local on_attach_def = function(client, bufnr)
|
||||||
require("which-key").register({
|
require("which-key").register({
|
||||||
K = { "<cmd>Lspsaga hover_doc ++quiet<cr>", "show info" },
|
K = { vim.lsp.buf.hover, "Hover" },
|
||||||
["<leader>"] = {
|
["<leader>"] = {
|
||||||
l = {
|
l = {
|
||||||
d = { "<cmd>Lspsaga show_cursor_diagnostics<cr>", "open diagnostic window" },
|
d = { vim.diagnostic.open_float, "Open diagnostic window" },
|
||||||
c = { "<cmd>Lspsaga code_action<cr>", "code action" },
|
c = { vim.lsp.buf.code_action, "Code action" },
|
||||||
r = { "<cmd>Lspsaga rename<cr>", "rename" },
|
r = { vim.lsp.buf.rename, "Rename" },
|
||||||
i = { "<cmd>Lspsaga hover_doc ++keep<cr>", "show info (sticky)" },
|
|
||||||
f = {
|
f = {
|
||||||
function()
|
function()
|
||||||
vim.lsp.buf.format({ async = true })
|
vim.lsp.buf.format({ async = true })
|
||||||
end,
|
end,
|
||||||
"format (lsp)",
|
"Format (lsp)",
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
t = {
|
t = {
|
||||||
l = { lsp_lines.toggle, "lsp lines" },
|
l = { lsp_lines.toggle, "LSP lines" },
|
||||||
|
i = {
|
||||||
|
function()
|
||||||
|
vim.lsp.inlay_hint(bufnr, nil)
|
||||||
|
end,
|
||||||
|
"LSP inlay hints",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
g = {
|
g = {
|
||||||
d = { "<cmd>Lspsaga peek_definition<cr>", "Goto definition" },
|
d = {
|
||||||
t = { "<cmd>Lspsaga peek_type_definition<cr>", "Goto type defininition" },
|
function()
|
||||||
h = { "<cmd>Lspsaga lsp_finder<CR>", "Lsp finder" },
|
require("telescope.builtin").lsp_definitions({ reuse_win = true })
|
||||||
r = { "<cmd>Telescope lsp_references<cr>", "Goto reference" },
|
end,
|
||||||
|
"Goto definition",
|
||||||
|
},
|
||||||
|
t = {
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_type_definitions({ reuse_win = true })
|
||||||
|
end,
|
||||||
|
"Goto type defininition",
|
||||||
|
},
|
||||||
|
r = { "<cmd>Telescope lsp_references<cr>", "Goto references" },
|
||||||
D = { vim.lsp.buf.declaration, "Goto declaration" },
|
D = { vim.lsp.buf.declaration, "Goto declaration" },
|
||||||
I = { "<cmd>Telescope lsp_implementations<cr>", "Goto implementation" },
|
I = { "<cmd>Telescope lsp_implementations<cr>", "Goto implementation" },
|
||||||
|
K = { vim.lsp.buf.signature_help, "Signature help" },
|
||||||
},
|
},
|
||||||
["["] = {
|
["["] = {
|
||||||
d = { "<cmd>Lspsaga diagnostic_jump_prev<cr>", "Previous diagnostic" },
|
d = { vim.diagnostic.goto_prev, "Previous diagnostic" },
|
||||||
},
|
},
|
||||||
["]"] = {
|
["]"] = {
|
||||||
d = { "<cmd>Lspsaga diagnostic_jump_next<cr>", "Next diagnostic" },
|
d = { vim.diagnostic.goto_next, "Next diagnostic" },
|
||||||
},
|
},
|
||||||
}, { buffer = bufnr, silent = true })
|
}, { buffer = bufnr, silent = true })
|
||||||
|
|
||||||
|
if client.server_capabilities.inlayHintProvider then
|
||||||
|
local slow_lsp_servers = {
|
||||||
|
"rust_analyzer",
|
||||||
|
}
|
||||||
|
local timeout = vim.tbl_contains(slow_lsp_servers, client.name, {}) and 500 or 0
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.lsp.inlay_hint(bufnr, true)
|
||||||
|
end, timeout)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local lspconfig_default_options = {
|
local lspconfig_default_options = {
|
||||||
|
@ -145,6 +160,7 @@ lspconfig_setup("lua_ls", {
|
||||||
runtime = {
|
runtime = {
|
||||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
version = "LuaJIT",
|
version = "LuaJIT",
|
||||||
|
path = vim.split(package.path, ";"),
|
||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
-- Get the language server to recognize the `vim` global
|
-- Get the language server to recognize the `vim` global
|
||||||
|
@ -162,6 +178,9 @@ lspconfig_setup("lua_ls", {
|
||||||
format = {
|
format = {
|
||||||
enable = false,
|
enable = false,
|
||||||
},
|
},
|
||||||
|
hint = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,265 +12,9 @@ in
|
||||||
options.my.services.dunst.enable = mkEnableOption "dunst";
|
options.my.services.dunst.enable = mkEnableOption "dunst";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz.services.dunst.enable = true;
|
||||||
services.dunst = {
|
home-manager.users.moritz.services.dunst.settings.global = {
|
||||||
enable = true;
|
font = "Monospace 10";
|
||||||
settings = {
|
|
||||||
global = {
|
|
||||||
### Display ###
|
|
||||||
|
|
||||||
# Which monitor should the notifications be displayed on.
|
|
||||||
monitor = 0;
|
|
||||||
|
|
||||||
# Display notification on focused monitor. Possible modes are:
|
|
||||||
# mouse: follow mouse pointer
|
|
||||||
# keyboard: follow window with keyboard focus
|
|
||||||
# none: don't follow anything
|
|
||||||
#
|
|
||||||
# "keyboard" needs a window manager that exports the
|
|
||||||
# _NET_ACTIVE_WINDOW property.
|
|
||||||
# This should be the case for almost all modern window managers.
|
|
||||||
#
|
|
||||||
# If this option is set to mouse or keyboard, the monitor option
|
|
||||||
# will be ignored.
|
|
||||||
follow = "mouse";
|
|
||||||
|
|
||||||
# The geometry of the window:
|
|
||||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
|
||||||
# The geometry of the message window.
|
|
||||||
# The height is measured in number of notifications everything else
|
|
||||||
# in pixels. If the width is omitted but the height is given
|
|
||||||
# ("-geometry x2"), the message window expands over the whole screen
|
|
||||||
# (dmenu-like). If width is 0, the window expands to the longest
|
|
||||||
# message displayed. A positive x is measured from the left, a
|
|
||||||
# negative from the right side of the screen. Y is measured from
|
|
||||||
# the top and down respectively.
|
|
||||||
# The width can be negative. In this case the actual width is the
|
|
||||||
# screen width minus the width defined in within the geometry option.
|
|
||||||
geometry = "0x4-25+25";
|
|
||||||
|
|
||||||
# Show how many messages are currently hidden (because of geometry).
|
|
||||||
indicate_hidden = "yes";
|
|
||||||
|
|
||||||
# Shrink window if it's smaller than the width. Will be ignored if
|
|
||||||
# width is 0.
|
|
||||||
shrink = "no";
|
|
||||||
|
|
||||||
# The transparency of the window. Range: [0; 100].
|
|
||||||
# This option will only work if a compositing window manager is
|
|
||||||
# present (e.g. xcompmgr, compiz, etc.).
|
|
||||||
transparency = "15";
|
|
||||||
|
|
||||||
# The height of the entire notification. If the height is smaller
|
|
||||||
# than the font height and padding combined, it will be raised
|
|
||||||
# to the font height and padding.
|
|
||||||
notification_height = 0;
|
|
||||||
|
|
||||||
# Draw a line of "separator_height" pixel height between two
|
|
||||||
# notifications.
|
|
||||||
# Set to 0 to disable.
|
|
||||||
separator_height = 1;
|
|
||||||
|
|
||||||
# Padding between text and separator.
|
|
||||||
padding = 8;
|
|
||||||
|
|
||||||
# Horizontal padding.
|
|
||||||
horizontal_padding = 10;
|
|
||||||
|
|
||||||
# Defines width in pixels of frame around the notification window.
|
|
||||||
# Set to 0 to disable.
|
|
||||||
frame_width = 0;
|
|
||||||
|
|
||||||
# Sort messages by urgency.
|
|
||||||
sort = "yes";
|
|
||||||
|
|
||||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
|
||||||
# for longer than idle_threshold seconds.
|
|
||||||
# Set to 0 to disable.
|
|
||||||
# A client can set the 'transient' hint to bypass this. See the rules
|
|
||||||
# section for how to disable this if necessary
|
|
||||||
idle_threshold = 120;
|
|
||||||
|
|
||||||
### Text ###
|
|
||||||
|
|
||||||
font = "Monospace 10";
|
|
||||||
|
|
||||||
# The spacing between lines. If the height is smaller than the
|
|
||||||
# font height, it will get raised to the font height.
|
|
||||||
line_height = 0;
|
|
||||||
|
|
||||||
# Possible values are:
|
|
||||||
# full: Allow a small subset of html markup in notifications:
|
|
||||||
# <b>bold</b>
|
|
||||||
# <i>italic</i>
|
|
||||||
# <s>strikethrough</s>
|
|
||||||
# <u>underline</u>
|
|
||||||
#
|
|
||||||
# For a complete reference see
|
|
||||||
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
|
|
||||||
#
|
|
||||||
# strip: This setting is provided for compatibility with some broken
|
|
||||||
# clients that send markup even though it's not enabled on the
|
|
||||||
# server. Dunst will try to strip the markup but the parsing is
|
|
||||||
# simplistic so using this option outside of matching rules for
|
|
||||||
# specific applications *IS GREATLY DISCOURAGED*.
|
|
||||||
#
|
|
||||||
# no: Disable markup parsing, incoming notifications will be treated as
|
|
||||||
# plain text. Dunst will not advertise that it has the body-markup
|
|
||||||
# capability if this is set as a global setting.
|
|
||||||
#
|
|
||||||
# It's important to note that markup inside the format option will be parsed
|
|
||||||
# regardless of what this is set to.
|
|
||||||
markup = "full";
|
|
||||||
|
|
||||||
# The format of the message. Possible variables are:
|
|
||||||
# %a appname
|
|
||||||
# %s summary
|
|
||||||
# %b body
|
|
||||||
# %i iconname (including its path)
|
|
||||||
# %I iconname (without its path)
|
|
||||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
|
||||||
# %n progress value if set without any extra characters
|
|
||||||
# %% Literal %
|
|
||||||
# Markup is allowed
|
|
||||||
format = ''
|
|
||||||
%s %p
|
|
||||||
%b'';
|
|
||||||
|
|
||||||
# Alignment of message text.
|
|
||||||
# Possible values are "left", "center" and "right".
|
|
||||||
alignment = "left";
|
|
||||||
|
|
||||||
# Vertical alignment of message text and icon.
|
|
||||||
# Possible values are "top", "center" and "bottom".
|
|
||||||
vertical_alignment = "center";
|
|
||||||
|
|
||||||
# Show age of message if message is older than show_age_threshold
|
|
||||||
# seconds.
|
|
||||||
# Set to -1 to disable.
|
|
||||||
show_age_threshold = 60;
|
|
||||||
|
|
||||||
# Split notifications into multiple lines if they don't fit into
|
|
||||||
# geometry.
|
|
||||||
word_wrap = "yes";
|
|
||||||
|
|
||||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
|
||||||
# Possible values are "start", "middle" and "end".
|
|
||||||
ellipsize = "middle";
|
|
||||||
|
|
||||||
# Ignore newlines '\n' in notifications.
|
|
||||||
ignore_newline = "no";
|
|
||||||
|
|
||||||
# Stack together notifications with the same content
|
|
||||||
stack_duplicates = true;
|
|
||||||
|
|
||||||
# Hide the count of stacked notifications with the same content
|
|
||||||
hide_duplicate_count = false;
|
|
||||||
|
|
||||||
# Display indicators for URLs (U) and actions (A).
|
|
||||||
show_indicators = "yes";
|
|
||||||
|
|
||||||
### Icons ###
|
|
||||||
|
|
||||||
# Align icons left/right/off
|
|
||||||
icon_position = "left";
|
|
||||||
|
|
||||||
# Scale small icons up to this size, set to 0 to disable. Helpful
|
|
||||||
# for e.g. small files or high-dpi screens. In case of conflict,
|
|
||||||
# max_icon_size takes precedence over this.
|
|
||||||
min_icon_size = 0;
|
|
||||||
|
|
||||||
# Scale larger icons down to this size, set to 0 to disable
|
|
||||||
max_icon_size = 64;
|
|
||||||
|
|
||||||
# Paths to default icons.
|
|
||||||
# icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
|
||||||
|
|
||||||
### History ###
|
|
||||||
|
|
||||||
# Should a notification popped up from history be sticky or timeout
|
|
||||||
# as if it would normally do.
|
|
||||||
sticky_history = "yes";
|
|
||||||
|
|
||||||
# Maximum amount of notifications kept in history
|
|
||||||
history_length = 20;
|
|
||||||
|
|
||||||
### Misc/Advanced ###
|
|
||||||
|
|
||||||
# dmenu path.
|
|
||||||
dmenu = "${pkgs.rofi}/bin/rofi -p dunst";
|
|
||||||
|
|
||||||
# Browser for opening urls in context menu.
|
|
||||||
browser = "${pkgs.firefox}/bin/firefox -new-tab";
|
|
||||||
|
|
||||||
# Always run rule-defined scripts, even if the notification is suppressed
|
|
||||||
always_run_script = true;
|
|
||||||
|
|
||||||
# Define the title of the windows spawned by dunst
|
|
||||||
title = "Dunst";
|
|
||||||
|
|
||||||
# Define the class of the windows spawned by dunst
|
|
||||||
class = "Dunst";
|
|
||||||
|
|
||||||
# Print a notification on startup.
|
|
||||||
# This is mainly for error detection, since dbus (re-)starts dunst
|
|
||||||
# automatically after a crash.
|
|
||||||
startup_notification = false;
|
|
||||||
|
|
||||||
# Manage dunst's desire for talking
|
|
||||||
# Can be one of the following values:
|
|
||||||
# crit: Critical features. Dunst aborts
|
|
||||||
# warn: Only non-fatal warnings
|
|
||||||
# mesg: Important Messages
|
|
||||||
# info: all unimportant stuff
|
|
||||||
# debug: all less than unimportant stuff
|
|
||||||
verbosity = "mesg";
|
|
||||||
|
|
||||||
# Define the corner radius of the notification window
|
|
||||||
# in pixel size. If the radius is 0, you have no rounded
|
|
||||||
# corners.
|
|
||||||
# The radius will be automatically lowered if it exceeds half of the
|
|
||||||
# notification height to avoid clipping text and/or icons.
|
|
||||||
corner_radius = 0;
|
|
||||||
|
|
||||||
# Ignore the dbus closeNotification message.
|
|
||||||
# Useful to enforce the timeout set by dunst configuration. Without this
|
|
||||||
# parameter, an application may close the notification sent before the
|
|
||||||
# user defined timeout.
|
|
||||||
ignore_dbusclose = false;
|
|
||||||
|
|
||||||
### Legacy
|
|
||||||
|
|
||||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
|
||||||
# This setting is provided for compatibility with older nVidia drivers that
|
|
||||||
# do not support RandR and using it on systems that support RandR is highly
|
|
||||||
# discouraged.
|
|
||||||
#
|
|
||||||
# By enabling this setting dunst will not be able to detect when a monitor
|
|
||||||
# is connected or disconnected which might break follow mode if the screen
|
|
||||||
# layout changes.
|
|
||||||
force_xinerama = false;
|
|
||||||
|
|
||||||
### mouse
|
|
||||||
|
|
||||||
# Defines list of actions for each mouse event
|
|
||||||
# Possible values are:
|
|
||||||
# * none: Don't do anything.
|
|
||||||
# * do_action: If the notification has exactly one action, or one is marked as default,
|
|
||||||
# invoke it. If there are multiple and no default, open the context menu.
|
|
||||||
# * close_current: Close current notification.
|
|
||||||
# * close_all: Close all notifications.
|
|
||||||
# These values can be strung together for each mouse event, and
|
|
||||||
# will be executed in sequence.
|
|
||||||
mouse_left_click = "close_current";
|
|
||||||
mouse_middle_click = "do_action, close_current";
|
|
||||||
mouse_right_click = "close_all";
|
|
||||||
};
|
|
||||||
urgency_low.timeout = 10;
|
|
||||||
urgency_normal.timeeout = 10;
|
|
||||||
urgency_critical.timeout = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@ in
|
||||||
package = pkgs.libvirt;
|
package = pkgs.libvirt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
users.users.moritz = {
|
users.users.moritz = {
|
||||||
extraGroups = [ "libvirtd" ];
|
extraGroups = [ "libvirtd" ];
|
||||||
packages = with pkgs; [ virt-manager virt-viewer ];
|
packages = with pkgs; [ virt-manager virt-viewer ];
|
||||||
|
|
|
@ -16,32 +16,16 @@ with lib.my;
|
||||||
src = inputs.smartcolumn-nvim;
|
src = inputs.smartcolumn-nvim;
|
||||||
};
|
};
|
||||||
|
|
||||||
copilot-lua = prev.vimPlugins.copilot-lua.overrideAttrs (_: {
|
|
||||||
version = mkVersionInput inputs.copilot-lua;
|
|
||||||
src = inputs.copilot-lua;
|
|
||||||
});
|
|
||||||
|
|
||||||
lspsaga-nvim-original = prev.vimPlugins.lspsaga-nvim-original.overrideAttrs (_: {
|
|
||||||
version = mkVersionInput inputs.lspsaga-nvim;
|
|
||||||
src = inputs.lspsaga-nvim;
|
|
||||||
});
|
|
||||||
|
|
||||||
cmp-async-path = prev.vimPlugins.cmp-path.overrideAttrs (_: {
|
|
||||||
pname = "cmp-async-path";
|
|
||||||
version = mkVersionInput inputs.cmp-async-path;
|
|
||||||
src = inputs.cmp-async-path;
|
|
||||||
});
|
|
||||||
|
|
||||||
leap-spooky-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
|
||||||
pname = "leap-spooky-nvim";
|
|
||||||
version = mkVersionInput inputs.leap-spooky-nvim;
|
|
||||||
src = inputs.leap-spooky-nvim;
|
|
||||||
};
|
|
||||||
|
|
||||||
telekasten-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
telekasten-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
||||||
pname = "telekasten-nvim";
|
pname = "telekasten-nvim";
|
||||||
version = mkVersionInput inputs.telekasten-nvim;
|
version = mkVersionInput inputs.telekasten-nvim;
|
||||||
src = inputs.telekasten-nvim;
|
src = inputs.telekasten-nvim;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hmts-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "hmts-nvim";
|
||||||
|
version = mkVersionInput inputs.hmts-nvim;
|
||||||
|
src = inputs.hmts-nvim;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue