nvf changes

This commit is contained in:
Charlie Root 2024-07-06 15:53:16 +02:00
commit 5548480371
42 changed files with 261 additions and 154 deletions

View file

@ -1,22 +1,22 @@
{
inputs,
lib,
...
inputs,
lib,
...
}: let
inherit (builtins) filter map toString elem;
inherit (lib.filesystem) listFilesRecursive;
inherit (lib.strings) hasSuffix;
inherit(lib.lists) concatLists;
inherit (lib.lists) concatLists;
mkNeovimModule ={
path,
mkNeovimModule = {
path,
ingoredPaths ? [./nvf.nix],
}:
filter (hasSuffix ".nix") (
map toString (
filter (path: path != ./default.nix && !elem path ingoredPaths) (listFilesRecursive path)
)
);
)
);
nvf = inputs.neovim-flake;
in {
@ -28,4 +28,4 @@ in {
# which means all default.nix files will be imported automtically
(mkNeovimModule {path = ./.;})
];
}
}

View file

@ -1,6 +1,11 @@
# Thank your Mr. poz! (https://git.jacekpoz.pl/jacekpoz/niksos)
{ config, inputs, lib, pkgs, ... }:
let
{
config,
inputs,
lib,
pkgs,
...
}: let
cfg = config.modules.editors.neovim;
inherit (config.modules.other.system) username;
@ -9,10 +14,10 @@ in {
options.modules.editors.neovim.enable = mkEnableOption "neovim";
config = mkIf cfg.enable {
environment.sessionVariables = { EDITOR = "nvim"; };
environment.sessionVariables = {EDITOR = "nvim";};
home-manager.users.${username} = {
imports = [ inputs.neovim-flake.homeManagerModules.default ];
imports = [inputs.neovim-flake.homeManagerModules.default];
programs.nvf = {
enable = true;
@ -77,7 +82,7 @@ in {
alwaysComplete = false;
};
filetree.nvimTree = { enable = true; };
filetree.nvimTree = {enable = true;};
terminal.toggleterm = {
enable = true;
@ -172,7 +177,7 @@ in {
orgmode = {
enable = true;
setupOpts = {
org_agenda_files = [ "~/Notes/org" ];
org_agenda_files = ["~/Notes/org"];
org_default_notes_file = "~/Notes/org/refile.org";
};
treesitter.enable = true;

View file

@ -1,12 +1,14 @@
{
config,
self,
pkgs,
...
}: let
inherit (config.modules.other.system) username;
inherit (pkgs.vimPlugins) friendly-snippets aerial-nvim nvim-surround undotree mkdir-nvim ssr-nvim direnv-vim legendary-nvim;
pluginSources = import ./sources {inherit self pkgs;};
in {
programs.neovim-flake.settings.vim.extraPlugins = {
home-manager.users.${username}.programs.neovim-flake.settings.vim.extraPlugins = {
# plugins that are pulled from nixpkgs
direnv = {package = direnv-vim;};
friendly-snippets = {package = friendly-snippets;};

View file

@ -1,5 +1,7 @@
{
programs.neovim-flake.settings.vim = {
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.programs.neovim-flake.settings.vim = {
assistant.copilot = {
enable = true;
cmp.enable = true;

View file

@ -1,5 +1,7 @@
{
programs.neovim-flake.settings.vim = {
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.programs.neovim-flake.settings.vim = {
autocomplete = {
enable = true;
type = "nvim-cmp";

View file

@ -1,5 +1,7 @@
{
programs.neovim-flake.settings.vim = {
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.programs.neovim-flake.settings.vim = {
autopairs.enable = true;
};
}

View file

@ -1,5 +1,7 @@
{
programs.neovim-flake.settings.vim = {
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.programs.neovim-flake.settings.vim = {
binds = {
whichKey.enable = true;
cheatsheet.enable = false;

View file

@ -1,5 +1,7 @@
{
programs.neovim-flake.settings.vim = {
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.programs.neovim-flake.settings.vim = {
comments.comment-nvim.enable = true;
};
}

View file

@ -1,5 +1,7 @@
{
programs.neovim-flake.settings.vim = {
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.programs.neovim-flake.settings.vim = {
dashboard = {
alpha.enable = true;
};

View file

@ -1,5 +1,7 @@
{
programs.neovim-flake.settings.vim = {
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.programs.neovim-flake.settings.vim = {
debugger.nvim-dap = {
enable = true;
ui.enable = true;

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
filetree = {
nvimTree = {

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
gestures.gesture-nvim.enable = false;
};

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
git = {
enable = true;

View file

@ -3,8 +3,10 @@
pkgs,
lib,
...
}: {
programs.neovim-flake.settings.vim = {
}: let
inherit (config.modules.other.system) username;
in {
home-manager.users.${username}.programs.neovim-flake.settings.vim = {
languages = {
enableLSP = true;
enableFormat = true;

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
lsp = {
formatOnSave = true;

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
minimap = {
# cool for vanity but practically useless on small screens

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
notes = {
todo-comments.enable = true;

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
notify = {
nvim-notify.enable = true;

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
presence.neocord.enable = false;
};

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
projects = {
project-nvim = {

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
session.nvim-session-manager = {
enable = false;

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
statusline = {
lualine = {

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
tabline = {
nvimBufferline.enable = true;

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
telescope.enable = true;
};

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
};
}

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
terminal = {
toggleterm = {

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
theme = {
enable = true;

View file

@ -1,4 +1,11 @@
{pkgs, ...}: {
{
config,
pkgs,
...
}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
treesitter = {
fold = true;

View file

@ -1,4 +1,11 @@
{
config,
pkgs,
...
}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
ui = {
noice.enable = true;

View file

@ -1,4 +1,11 @@
{pkgs, ...}: {
{
config,
pkgs,
...
}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
utility = {
ccc.enable = true;

View file

@ -1,4 +1,7 @@
{
{config, ...}: let
inherit (config.modules.other.system) username;
in {
home-manager.${username}.
programs.neovim-flake.settings.vim = {
visuals = {
enable = true;

View file

@ -15,71 +15,69 @@
smart-splits = buildVimPlugin {
name = "smart-splits";
src = pins."smart-splits.nvim";
};
slides-nvim = buildVimPlugin {
name = "slides.nvim";
src = pins."slides.nvim";
};
regexplainer = buildVimPlugin {
name = "nvim-regexplainer";
src = fetchFromGitHub {
owner = "bennypowers";
repo = "nvim-regexplainer";
rev = "4250c8f3c1307876384e70eeedde5149249e154f";
hash = "sha256-15DLbKtOgUPq4DcF71jFYu31faDn52k3P1x47GL3+b0=";
owner = "mrjones2014";
repo = "smart-splits.nvim";
rev = "95833675cd92538bf9cded1d2d58d1fc271c5428";
hash = "";
};
};
specs-nvim = buildVimPlugin {
name = "specs.nvim";
src = fetchFromGitHub {
owner = "notashelf";
repo = "specs.nvim";
rev = "0792aaebf8cbac0c8545c43ad648b98deb83af42";
hash = "sha256-doHE/3bRuC8lyYxMk927JmwLfiy7aR22+i+BNefEGJ4=";
regexplainer = buildVimPlugin {
name = "nvim-regexplainer";
src = fetchFromGitHub {
owner = "bennypowers";
repo = "nvim-regexplainer";
rev = "4250c8f3c1307876384e70eeedde5149249e154f";
hash = "sha256-15DLbKtOgUPq4DcF71jFYu31faDn52k3P1x47GL3+b0=";
};
};
};
deferred-clipboard = buildVimPlugin {
name = "deferred-clipboard";
src = fetchFromGitHub {
owner = "EtiamNullam";
repo = "deferred-clipboard.nvim";
rev = "810a29d166eaa41afc220cc7cd85eeaa3c43b37f";
hash = "sha256-nanNQEtpjv0YKEkkrPmq/5FPxq+Yj/19cs0Gf7YgKjU=";
specs-nvim = buildVimPlugin {
name = "specs.nvim";
src = fetchFromGitHub {
owner = "notashelf";
repo = "specs.nvim";
rev = "0792aaebf8cbac0c8545c43ad648b98deb83af42";
hash = "sha256-doHE/3bRuC8lyYxMk927JmwLfiy7aR22+i+BNefEGJ4=";
};
};
};
data-viewer-nvim = buildVimPlugin {
name = "data-viewer.nvim";
src = fetchFromGitHub {
owner = "VidocqH";
repo = "data-viewer.nvim";
rev = "40ddf37bb7ab6c04ff9e820812d1539afe691668";
hash = "sha256-D5hvLhsYski11H9qiDDL2zlZMtYmbpHgpewiWR6C7rE=";
deferred-clipboard = buildVimPlugin {
name = "deferred-clipboard";
src = fetchFromGitHub {
owner = "EtiamNullam";
repo = "deferred-clipboard.nvim";
rev = "810a29d166eaa41afc220cc7cd85eeaa3c43b37f";
hash = "sha256-nanNQEtpjv0YKEkkrPmq/5FPxq+Yj/19cs0Gf7YgKjU=";
};
};
};
vim-nftables = buildVimPlugin {
name = "vim-nftables";
src = fetchFromGitHub {
owner = "awisse";
repo = "vim-nftables";
rev = "bc29309080b4c7e1888ffb1a830846be16e5b8e7";
hash = "sha256-L1x3Hv95t/DBBrLtPBKrqaTbIPor/NhVuEHVIYo/OaA=";
data-viewer-nvim = buildVimPlugin {
name = "data-viewer.nvim";
src = fetchFromGitHub {
owner = "VidocqH";
repo = "data-viewer.nvim";
rev = "40ddf37bb7ab6c04ff9e820812d1539afe691668";
hash = "sha256-D5hvLhsYski11H9qiDDL2zlZMtYmbpHgpewiWR6C7rE=";
};
};
vim-nftables = buildVimPlugin {
name = "vim-nftables";
src = fetchFromGitHub {
owner = "awisse";
repo = "vim-nftables";
rev = "bc29309080b4c7e1888ffb1a830846be16e5b8e7";
hash = "sha256-L1x3Hv95t/DBBrLtPBKrqaTbIPor/NhVuEHVIYo/OaA=";
};
};
};
neotab-nvim = buildVimPlugin {
name = "neotab.nvim";
src = fetchFromGitHub {
owner = "kawre";
repo = "neotab.nvim";
rev = "6c6107dddaa051504e433608f59eca606138269b";
hash = "sha256-bSFKbjj8fJHdfBzYoQ9l3NU0GAYfdfCbESKbwdbLNSw=";
neotab-nvim = buildVimPlugin {
name = "neotab.nvim";
src = fetchFromGitHub {
owner = "kawre";
repo = "neotab.nvim";
rev = "6c6107dddaa051504e433608f59eca606138269b";
hash = "sha256-bSFKbjj8fJHdfBzYoQ9l3NU0GAYfdfCbESKbwdbLNSw=";
};
};
};
};

View file

@ -50,7 +50,7 @@ in {
useSystemClipboard = true;
spellcheck = {
enable = true;
languages = ["en" "de" ];
languages = ["en" "de"];
};
enableLuaLoader = true;

View file

@ -1,5 +1,10 @@
{ config, inputs, lib, pkgs, ... }:
let
{
config,
inputs,
lib,
pkgs,
...
}: let
cfg = config.modules.programs.foot;
inherit (config.modules.other.system) username;
@ -11,7 +16,7 @@ in {
};
config = mkIf cfg.enable {
environment.sessionVariables = { TERM = "foot"; };
environment.sessionVariables = {TERM = "foot";};
home-manager.users.${username} = {
programs.foot = {
enable = true;
@ -36,8 +41,7 @@ in {
pad = "5x5 center";
resize-delay-ms = 100;
notify =
"${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
notify = "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
bold-text-in-bright = "no";
word-delimiters = '',`|:"'()[]{}<>'';
@ -59,8 +63,7 @@ in {
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
label-letters = "sadfjklewcmpgh";
osc8-underline = "always";
protocols =
"http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
protocols = "http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
uri-characters = ''
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]'';
};
@ -93,7 +96,7 @@ in {
# bright6 = "94e2d5"; # teal
# bright7 = "a6adc8"; # Subtext 0
# };
csd = { preferred = "server"; };
csd = {preferred = "server";};
key-bindings = {
show-urls-launch = "Control+Shift+u";
unicode-input = "Control+Shift+i";

View file

@ -22,7 +22,7 @@ in {
programs.gamemode.enable = true;
environment.systemPackages = [pkgs.protonup];
environment.sessionVariables = {
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${username}/.steam/root/compatibilitytoolds.d";
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${username}/.steam/root/compatibilitytoolds.d";
};
};
}

View file

@ -61,7 +61,6 @@ in {
];
# Workspace config
workspace = [
"1,monitor:HDMI-A-1, default:true"
"2,monitor:HDMI-A-1"
"3,monitor:HDMI-A-1"