added enable option to nvim

changed home-manager personal config namespace from home.* to user.*
This commit is contained in:
Gabe Venberg 2024-05-29 13:40:03 -05:00
parent 322788aa3a
commit 6f0e167087
30 changed files with 539 additions and 525 deletions

View file

@ -60,7 +60,7 @@ inputs.nixpkgs.lib.nixosSystem {
... ...
}: { }: {
host = osConfig.host; host = osConfig.host;
home = { user = {
git = { git = {
profile = { profile = {
name = "Gabe Venberg"; name = "Gabe Venberg";

View file

@ -14,12 +14,8 @@ inputs.home-manager.lib.homeManagerConfiguration {
... ...
}: { }: {
# machine specific options # machine specific options
home = { user = {
enable-speech = true; enable-speech = true;
nvim = {
enable-lsp = true;
enable-treesitter = true;
};
git = { git = {
profile = { profile = {
name = "Gabe Venberg"; name = "Gabe Venberg";

View file

@ -15,7 +15,7 @@ inputs.home-manager.lib.homeManagerConfiguration {
... ...
}: { }: {
# machine specific options # machine specific options
home = { user = {
nvim = { nvim = {
enable-lsp = true; enable-lsp = true;
enable-treesitter = true; enable-treesitter = true;

View file

@ -65,11 +65,7 @@ inputs.nixpkgs.lib.nixosSystem {
... ...
}: { }: {
host = osConfig.host; host = osConfig.host;
home = { user = {
nvim = {
enable-lsp = true;
enable-treesitter = true;
};
git = { git = {
profile = { profile = {
name = "Gabe Venberg"; name = "Gabe Venberg";
@ -87,11 +83,6 @@ inputs.nixpkgs.lib.nixosSystem {
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
services.nfs.server = {
enable = true;
exports = "/srv/nfs *(rw,sync,no_root_squash,no_subtree_check)";
};
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View file

@ -41,7 +41,7 @@ inputs.nixpkgs.lib.nixosSystem {
... ...
}: { }: {
host = osConfig.host; host = osConfig.host;
home = { user = {
nvim = { nvim = {
enable-lsp = true; enable-lsp = true;
enable-treesitter = true; enable-treesitter = true;

View file

@ -4,15 +4,10 @@
lib, lib,
... ...
}: { }: {
options = { options.user.nvim.enable-completions = lib.mkEnableOption "basic completion in nvim";
home.nvim.enable-completions =
(lib.mkEnableOption "basic completion in nvim")
// {
default = false;
};
};
config = config =
lib.mkIf config.home.nvim.enable-completions lib.mkIf (config.user.nvim.enable-completions && config.user.nvim.enable)
{ {
programs.nixvim = { programs.nixvim = {
plugins.luasnip.enable = true; plugins.luasnip.enable = true;

View file

@ -3,29 +3,33 @@
pkgs, pkgs,
helpers, helpers,
lib, lib,
config,
... ...
}: { }: {
programs.nixvim = { options.user.nvim.enable = lib.mkEnableOption "enable nvim";
enable = true; config = lib.mkIf config.user.nvim.enable {
viAlias = true; programs.nixvim = {
vimAlias = true;
colorschemes.base16 = {
colorscheme = "gruvbox-dark-medium";
enable = true; enable = true;
viAlias = true;
vimAlias = true;
colorschemes.base16 = {
colorscheme = "gruvbox-dark-medium";
enable = true;
};
clipboard.providers.xsel.enable = true;
};
home.sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
}; };
clipboard.providers.xsel.enable = true; programs.nushell.extraEnv = ''
$env.EDITOR = nvim
$env.VISUAL = nvim
'';
}; };
home.sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
};
programs.nushell.extraEnv = ''
$env.EDITOR = nvim
$env.VISUAL = nvim
'';
imports = [ imports = [
./keybinds.nix ./keybinds.nix

View file

@ -1,25 +1,28 @@
{ {
configs, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
plugins.gitsigns = { programs.nixvim = {
enable = true; plugins.gitsigns = {
enable = true;
};
plugins.which-key.registrations = {
"<leader>g" = "+git";
};
keymaps = [
{
action = ":Gitsigns toggle_current_line_blame<CR>";
key = "<leader>gb";
mode = "n";
options = {
silent = true;
desc = "toggle git blame";
};
}
];
}; };
plugins.which-key.registrations = {
"<leader>g" = "+git";
};
keymaps = [
{
action = ":Gitsigns toggle_current_line_blame<CR>";
key = "<leader>gb";
mode = "n";
options = {
silent = true;
desc = "toggle git blame";
};
}
];
}; };
} }

View file

@ -1,97 +1,100 @@
{ {
configs, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
globals = { programs.nixvim = {
mapleader = ";"; globals = {
mapleader = ";";
};
plugins.which-key.registrations = {
"<leader>c" = "+check";
};
keymaps = [
{
action = ":setlocal spell!<CR>";
key = "<leader>cs";
mode = "n";
options = {
silent = true;
desc = "toggle spell check";
};
}
{
action = ":bnext<CR>";
key = "gf";
mode = "n";
options = {
silent = true;
desc = "next buffer";
};
}
{
action = ":bprevious<CR>";
key = "gF";
mode = "n";
options = {
silent = true;
desc = "prev buffer";
};
}
{
action = "<C-w>h";
key = "<C-h>";
mode = "n";
options = {
silent = true;
desc = "move to right split";
};
}
{
action = "<C-w>j";
key = "<C-j>";
mode = "n";
options = {
silent = true;
desc = "move to below split";
};
}
{
action = "<C-w>k";
key = "<C-k>";
mode = "n";
options = {
silent = true;
desc = "move to above split";
};
}
{
action = "<C-w>l";
key = "<C-l>";
mode = "n";
options = {
silent = true;
desc = "move to left split";
};
}
{
action = "za";
key = "<Space>";
mode = "n";
options = {
silent = true;
desc = "toggle fold";
};
}
{
action = ":nohls<CR>";
key = "<leader>h";
mode = "n";
options = {
silent = true;
desc = "clear highlighting";
};
}
];
}; };
plugins.which-key.registrations = {
"<leader>c" = "+check";
};
keymaps = [
{
action = ":setlocal spell!<CR>";
key = "<leader>cs";
mode = "n";
options = {
silent = true;
desc = "toggle spell check";
};
}
{
action = ":bnext<CR>";
key = "gf";
mode = "n";
options = {
silent = true;
desc = "next buffer";
};
}
{
action = ":bprevious<CR>";
key = "gF";
mode = "n";
options = {
silent = true;
desc = "prev buffer";
};
}
{
action = "<C-w>h";
key = "<C-h>";
mode = "n";
options = {
silent = true;
desc = "move to right split";
};
}
{
action = "<C-w>j";
key = "<C-j>";
mode = "n";
options = {
silent = true;
desc = "move to below split";
};
}
{
action = "<C-w>k";
key = "<C-k>";
mode = "n";
options = {
silent = true;
desc = "move to above split";
};
}
{
action = "<C-w>l";
key = "<C-l>";
mode = "n";
options = {
silent = true;
desc = "move to left split";
};
}
{
action = "za";
key = "<Space>";
mode = "n";
options = {
silent = true;
desc = "toggle fold";
};
}
{
action = ":nohls<CR>";
key = "<leader>h";
mode = "n";
options = {
silent = true;
desc = "clear highlighting";
};
}
];
}; };
} }

View file

@ -4,32 +4,16 @@
lib, lib,
... ...
}: { }: {
home.file = { config = lib.mkIf (config.user.nvim.enable && config.user.nvim.enable-lsp) {
".clangd".text = '' home.file = {
# keeps clangd from choking when it sees a compiler flag for a different ".clangd".text = ''
# compiler. (sutch as when acting as an lsp for a project that uses GCC.) # keeps clangd from choking when it sees a compiler flag for a different
CompileFlags: # compiler. (sutch as when acting as an lsp for a project that uses GCC.)
Add: -Wno-unknown-warning-option CompileFlags:
Remove: [-m*, -f*] Add: -Wno-unknown-warning-option
''; Remove: [-m*, -f*]
".clang-format".text = '' '';
--- ".clang-format".text = ''
#this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other.
PointerAlignment: Left
ColumnLimit: 80
IndentWidth: 4
TabWidth: 4
UseCRLF: false
UseTab: Never
AlignAfterOpenBracket: BlockIndent
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBraces: Attach
AlignOperands: Align
BreakBeforeBinaryOperators: NonAssignment
...
'';
"work/.clang-format" = lib.mkIf config.home.git.workProfile.enable {
text = ''
--- ---
#this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other. #this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other.
PointerAlignment: Left PointerAlignment: Left
@ -40,10 +24,28 @@
UseTab: Never UseTab: Never
AlignAfterOpenBracket: BlockIndent AlignAfterOpenBracket: BlockIndent
AlwaysBreakBeforeMultilineStrings: true AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBraces: Allman BreakBeforeBraces: Attach
BreakBeforeBinaryOperators: None AlignOperands: Align
BreakBeforeBinaryOperators: NonAssignment
... ...
''; '';
"work/.clang-format" = lib.mkIf config.user.git.workProfile.enable {
text = ''
---
#this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other.
PointerAlignment: Left
ColumnLimit: 80
IndentWidth: 4
TabWidth: 4
UseCRLF: false
UseTab: Never
AlignAfterOpenBracket: BlockIndent
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBraces: Allman
BreakBeforeBinaryOperators: None
...
'';
};
}; };
}; };
} }

View file

@ -4,14 +4,12 @@
lib, lib,
... ...
}: { }: {
options = { options.user.nvim.enable-lsp = lib.mkEnableOption "nvim lsp";
home.nvim.enable-lsp = lib.mkEnableOption "nvim lsp";
};
config = config =
lib.mkIf config.home.nvim.enable-lsp lib.mkIf (config.user.nvim.enable-lsp && config.user.nvim.enable)
{ {
home.nvim.enable-completions = true; user.nvim.enable-completions = true;
programs.nixvim = { programs.nixvim = {
plugins.lsp = { plugins.lsp = {
enable = true; enable = true;

View file

@ -5,7 +5,7 @@
... ...
}: { }: {
config = config =
lib.mkIf config.home.nvim.enable-lsp lib.mkIf (config.user.nvim.enable-lsp && config.user.nvim.enable)
{ {
programs.nixvim = { programs.nixvim = {
plugins.rust-tools = { plugins.rust-tools = {

View file

@ -1,76 +1,79 @@
{ {
configs, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
plugins.lualine = { programs.nixvim = {
enable = true; plugins.lualine = {
alwaysDivideMiddle = true; enable = true;
iconsEnabled = true; alwaysDivideMiddle = true;
sections = { iconsEnabled = true;
lualine_a = [ sections = {
{name = "mode";} lualine_a = [
]; {name = "mode";}
lualine_b = [ ];
{name = "branch";} lualine_b = [
{name = "diff";} {name = "branch";}
{name = "diagnostics";} {name = "diff";}
]; {name = "diagnostics";}
lualine_c = [ ];
{ lualine_c = [
name = "filename"; {
extraConfig = {path = 1;}; name = "filename";
} extraConfig = {path = 1;};
]; }
lualine_x = [ ];
{name = "encoding";} lualine_x = [
{name = "fileformat";} {name = "encoding";}
{name = "filetype";} {name = "fileformat";}
]; {name = "filetype";}
lualine_y = [ ];
{name = "progress";} lualine_y = [
]; {name = "progress";}
lualine_z = [ ];
{name = "location";} lualine_z = [
]; {name = "location";}
}; ];
};
inactiveSections = { inactiveSections = {
lualine_a = []; lualine_a = [];
lualine_b = []; lualine_b = [];
lualine_c = [{name = "filename";}]; lualine_c = [{name = "filename";}];
lualine_x = [{name = "filetype";}]; lualine_x = [{name = "filetype";}];
lualine_y = []; lualine_y = [];
lualine_z = []; lualine_z = [];
}; };
tabline = { tabline = {
lualine_a = [ lualine_a = [
{ {
name = "buffers"; name = "buffers";
extraConfig = {mode = 4;}; extraConfig = {mode = 4;};
} }
]; ];
lualine_b = []; lualine_b = [];
lualine_c = []; lualine_c = [];
lualine_x = []; lualine_x = [];
lualine_y = []; lualine_y = [];
lualine_z = [ lualine_z = [
{ {
name = "tabs"; name = "tabs";
extraConfig = {mode = 2;}; extraConfig = {mode = 2;};
} }
]; ];
}; };
winbar = { winbar = {
lualine_a = []; lualine_a = [];
lualine_b = []; lualine_b = [];
lualine_c = []; lualine_c = [];
lualine_x = []; lualine_x = [];
lualine_y = []; lualine_y = [];
lualine_z = []; lualine_z = [];
};
}; };
}; };
}; };

View file

@ -1,31 +1,34 @@
{ {
configs, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
plugins.nvim-tree = { programs.nixvim = {
enable = true; plugins.nvim-tree = {
disableNetrw = true; enable = true;
hijackCursor = true; disableNetrw = true;
hijackNetrw = true; hijackCursor = true;
hijackUnnamedBufferWhenOpening = true; hijackNetrw = true;
actions = { hijackUnnamedBufferWhenOpening = true;
useSystemClipboard = true; actions = {
changeDir.enable = true; useSystemClipboard = true;
}; changeDir.enable = true;
filesystemWatchers.enable = true;
};
keymaps = [
{
action = ":NvimTreeToggle<CR>";
key = "<leader>t";
mode = "n";
options = {
silent = true;
desc = "toggle file browser";
}; };
} filesystemWatchers.enable = true;
]; };
keymaps = [
{
action = ":NvimTreeToggle<CR>";
key = "<leader>t";
mode = "n";
options = {
silent = true;
desc = "toggle file browser";
};
}
];
};
}; };
} }

View file

@ -1,70 +1,72 @@
{ {
configs, config,
pkgs, pkgs,
lib, lib,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
opts = { programs.nixvim = {
mouse = "a"; opts = {
lazyredraw = true; mouse = "a";
termguicolors = true; lazyredraw = true;
autoread = true; termguicolors = true;
swapfile = false; autoread = true;
history = 500; swapfile = false;
formatoptions = "rojq"; history = 500;
# dont hard wrap formatoptions = "rojq";
textwidth = 0; # dont hard wrap
wrapmargin = 0; textwidth = 0;
breakindent = true; wrapmargin = 0;
# highlight after col breakindent = true;
colorcolumn = "80,100,120"; # highlight after col
# add ruler to side of screen colorcolumn = "80,100,120";
number = true; # add ruler to side of screen
numberwidth = 3; number = true;
#display cursor cordinates numberwidth = 3;
ruler = true; #display cursor cordinates
#always leave 5 cells between cursor and side of window ruler = true;
scrolloff = 5; #always leave 5 cells between cursor and side of window
# better command line completion scrolloff = 5;
wildmenu = true; # better command line completion
# ignore case if all lowercase wildmenu = true;
ignorecase = true; # ignore case if all lowercase
smartcase = true; ignorecase = true;
# show unfinished keycombos in statusbar smartcase = true;
showcmd = true; # show unfinished keycombos in statusbar
# regex stuff showcmd = true;
magic = true; # regex stuff
# always show statusline magic = true;
laststatus = 2; # always show statusline
# tab stuff laststatus = 2;
tabstop = 4; # tab stuff
shiftwidth = 0; tabstop = 4;
autoindent = true; shiftwidth = 0;
smartindent = true; autoindent = true;
smarttab = true; smartindent = true;
# for true tabs, change to false smarttab = true;
expandtab = true; # for true tabs, change to false
softtabstop = -1; expandtab = true;
# highlight search results as you type softtabstop = -1;
hlsearch = true; # highlight search results as you type
incsearch = true; hlsearch = true;
# folding stuff incsearch = true;
foldlevelstart = 5; # folding stuff
foldmethod = lib.mkDefault "indent"; foldlevelstart = 5;
foldcolumn = "auto:4"; foldmethod = lib.mkDefault "indent";
foldenable = true; foldcolumn = "auto:4";
# display whitespace as other chars foldenable = true;
list = true; # display whitespace as other chars
listchars = { list = true;
tab = ">-"; listchars = {
eol = ""; tab = ">-";
nbsp = ""; eol = "";
trail = ""; nbsp = "";
extends = ""; trail = "";
precedes = ""; extends = "";
precedes = "";
};
showbreak = "";
}; };
showbreak = "";
}; };
}; };
} }

View file

@ -1,21 +1,24 @@
{ {
configs, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
plugins.comment.enable = true; programs.nixvim = {
plugins.marks.enable = true; plugins.comment.enable = true;
plugins.surround.enable = true; plugins.marks.enable = true;
plugins.todo-comments.enable = true; plugins.surround.enable = true;
plugins.leap = { plugins.todo-comments.enable = true;
enable = true; plugins.leap = {
addDefaultMappings = true; enable = true;
addDefaultMappings = true;
};
extraPlugins = with pkgs.vimPlugins; [
vim-numbertoggle
dressing-nvim
];
extraConfigLua = ''require("dressing").setup({})'';
}; };
extraPlugins = with pkgs.vimPlugins; [
vim-numbertoggle
dressing-nvim
];
extraConfigLua = ''require("dressing").setup({})'';
}; };
} }

View file

@ -1,116 +1,119 @@
{ {
configs, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
plugins.telescope = { programs.nixvim = {
enable = true; plugins.telescope = {
enable = true;
};
plugins.which-key.registrations = {
"<leader>f" = "+telescope";
"<leader>fg" = "+telescope git";
};
keymaps = [
{
action = ":Telescope find_files<CR>";
key = "<leader>ff";
mode = "n";
options = {
silent = true;
desc = "files";
};
}
{
action = ":Telescope live_grep<CR>";
key = "<leader>fg";
mode = "n";
options = {
silent = true;
desc = "grep";
};
}
{
action = ":Telescope buffers<CR>";
key = "<leader>fb";
mode = "n";
options = {
silent = true;
desc = "buffers";
};
}
{
action = ":Telescope marks<CR>";
key = "<leader>fm";
mode = "n";
options = {
silent = true;
desc = "marks";
};
}
{
action = ":Telescope registers<CR>";
key = "<leader>fr";
mode = "n";
options = {
silent = true;
desc = "registers";
};
}
{
action = ":Telescope keymaps<CR>";
key = "<leader>fk";
mode = "n";
options = {
silent = true;
desc = "keymaps";
};
}
{
action = ":Telescope current_buffer_fuzzy_find<CR>";
key = "<leader>fz";
mode = "n";
options = {
silent = true;
desc = "fuzzy find";
};
}
{
action = ":Telescope git_commits<CR>";
key = "<leader>fgc";
mode = "n";
options = {
silent = true;
desc = "commits";
};
}
{
action = ":Telescope git_branches<CR>";
key = "<leader>fgb";
mode = "n";
options = {
silent = true;
desc = "branches";
};
}
{
action = ":Telescope git_stash<CR>";
key = "<leader>fgs";
mode = "n";
options = {
silent = true;
desc = "stash";
};
}
{
action = ":Telescope git_commits<CR>";
key = "<leader>fgc";
mode = "n";
options = {
silent = true;
desc = "commits";
};
}
];
}; };
plugins.which-key.registrations = {
"<leader>f" = "+telescope";
"<leader>fg" = "+telescope git";
};
keymaps = [
{
action = ":Telescope find_files<CR>";
key = "<leader>ff";
mode = "n";
options = {
silent = true;
desc = "files";
};
}
{
action = ":Telescope live_grep<CR>";
key = "<leader>fg";
mode = "n";
options = {
silent = true;
desc = "grep";
};
}
{
action = ":Telescope buffers<CR>";
key = "<leader>fb";
mode = "n";
options = {
silent = true;
desc = "buffers";
};
}
{
action = ":Telescope marks<CR>";
key = "<leader>fm";
mode = "n";
options = {
silent = true;
desc = "marks";
};
}
{
action = ":Telescope registers<CR>";
key = "<leader>fr";
mode = "n";
options = {
silent = true;
desc = "registers";
};
}
{
action = ":Telescope keymaps<CR>";
key = "<leader>fk";
mode = "n";
options = {
silent = true;
desc = "keymaps";
};
}
{
action = ":Telescope current_buffer_fuzzy_find<CR>";
key = "<leader>fz";
mode = "n";
options = {
silent = true;
desc = "fuzzy find";
};
}
{
action = ":Telescope git_commits<CR>";
key = "<leader>fgc";
mode = "n";
options = {
silent = true;
desc = "commits";
};
}
{
action = ":Telescope git_branches<CR>";
key = "<leader>fgb";
mode = "n";
options = {
silent = true;
desc = "branches";
};
}
{
action = ":Telescope git_stash<CR>";
key = "<leader>fgs";
mode = "n";
options = {
silent = true;
desc = "stash";
};
}
{
action = ":Telescope git_commits<CR>";
key = "<leader>fgc";
mode = "n";
options = {
silent = true;
desc = "commits";
};
}
];
}; };
} }

View file

@ -1,36 +1,39 @@
{ {
configs, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
plugins.toggleterm = { programs.nixvim = {
enable = true; plugins.toggleterm = {
settings = { enable = true;
direction = "horizontal"; settings = {
insert_mappings = false; direction = "horizontal";
terminal_mappings = false; insert_mappings = false;
open_mapping = ''[[<c-\>]]''; terminal_mappings = false;
}; open_mapping = ''[[<c-\>]]'';
};
keymaps = [
{
action = "function() Floatingterm:toggle() end";
key = "<leader>s";
lua = true;
mode = "n";
options = {
silent = true;
desc = "toggle scratch terminal";
}; };
} };
]; keymaps = [
extraConfigLuaPre = '' {
local Terminal = require('toggleterm.terminal').Terminal action = "function() Floatingterm:toggle() end";
Floatingterm = Terminal:new({ key = "<leader>s";
hidden = true, lua = true;
direction = "float" mode = "n";
}) options = {
''; silent = true;
desc = "toggle scratch terminal";
};
}
];
extraConfigLuaPre = ''
local Terminal = require('toggleterm.terminal').Terminal
Floatingterm = Terminal:new({
hidden = true,
direction = "float"
})
'';
};
}; };
} }

View file

@ -5,7 +5,7 @@
... ...
}: { }: {
config = config =
lib.mkIf config.home.nvim.enable-treesitter lib.mkIf (config.user.nvim.enable-treesitter && config.user.nvim.enable)
{ {
programs.nixvim = { programs.nixvim = {
keymaps = [ keymaps = [

View file

@ -4,19 +4,12 @@
lib, lib,
... ...
}: { }: {
options = { options.user.nvim.enable-treesitter = lib.mkEnableOption "enable nvim treesitter";
home.nvim.enable-treesitter = lib.mkOption {
default = false;
type = lib.types.bool;
description = ''
enable nvim treesitter
'';
};
};
config = config =
lib.mkIf config.home.nvim.enable-treesitter lib.mkIf (config.user.nvim.enable-treesitter && config.user.nvim.enable)
{ {
home.nvim.enable-completions = true; user.nvim.enable-completions = true;
programs.nixvim = { programs.nixvim = {
plugins.treesitter = { plugins.treesitter = {
enable = true; enable = true;

View file

@ -5,7 +5,7 @@
... ...
}: { }: {
config = config =
lib.mkIf config.home.nvim.enable-treesitter lib.mkIf (config.user.nvim.enable-treesitter && config.user.nvim.enable)
{ {
programs.nixvim = { programs.nixvim = {
plugins.rainbow-delimiters = { plugins.rainbow-delimiters = {

View file

@ -5,7 +5,7 @@
... ...
}: { }: {
config = config =
lib.mkIf config.home.nvim.enable-treesitter lib.mkIf (config.user.nvim.enable-treesitter && config.user.nvim.enable)
{ {
programs.nixvim = let programs.nixvim = let
nu-grammar = pkgs.tree-sitter.buildGrammar { nu-grammar = pkgs.tree-sitter.buildGrammar {

View file

@ -1,15 +1,18 @@
{ {
configs, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.nixvim = { config = lib.mkIf config.user.nvim.enable {
opts = { programs.nixvim = {
timeout = true; opts = {
timeoutlen = 300; timeout = true;
}; timeoutlen = 300;
plugins.which-key = { };
enable = true; plugins.which-key = {
enable = true;
};
}; };
}; };
} }

View file

@ -5,7 +5,7 @@
... ...
}: { }: {
options = { options = {
home.git = { user.git = {
workProfile = { workProfile = {
enable = lib.mkEnableOption "git work profile"; enable = lib.mkEnableOption "git work profile";
email = lib.mkOption { email = lib.mkOption {
@ -45,8 +45,8 @@
}; };
# difftastic.enable=true; # difftastic.enable=true;
# difftastic.background="dark"; # difftastic.background="dark";
userEmail = config.home.git.profile.email; userEmail = config.user.git.profile.email;
userName = config.home.git.profile.name; userName = config.user.git.profile.name;
extraConfig = { extraConfig = {
init = { init = {
defaultBranch = "main"; defaultBranch = "main";
@ -75,11 +75,11 @@
}; };
}; };
includes = includes =
if config.home.git.workProfile.enable if config.user.git.workProfile.enable
then [ then [
{ {
condition = "gitdir:~/work/**"; condition = "gitdir:~/work/**";
contents.user.email = config.home.git.workProfile.email; contents.user.email = config.user.git.workProfile.email;
} }
] ]
else []; else [];

View file

@ -46,7 +46,7 @@
hostname = { hostname = {
ssh_only = false; ssh_only = false;
ssh_symbol = "🌐"; ssh_symbol = "🌐";
format = "[$hostname$ssh_symbol]($style)"; format = "[$hostname $ssh_symbol]($style)";
style = "bg:color_orange"; style = "bg:color_orange";
}; };
shell = { shell = {

View file

@ -5,11 +5,11 @@
... ...
}: { }: {
options = { options = {
home.enable-speech = lib.mkEnableOption "espeak"; user.enable-speech = lib.mkEnableOption "espeak";
}; };
config = config =
lib.mkIf config.home.enable-speech lib.mkIf config.user.enable-speech
{ {
home.shellAliases = { home.shellAliases = {
say = "espeak -p 10 -s 150 -a 200"; say = "espeak -p 10 -s 150 -a 200";

View file

@ -11,7 +11,11 @@
../../modules/home-manager/terminal/ssh-agent.nix ../../modules/home-manager/terminal/ssh-agent.nix
../../modules/home-manager/terminal/direnv.nix ../../modules/home-manager/terminal/direnv.nix
../../modules/home-manager/terminal/btop.nix ../../modules/home-manager/terminal/btop.nix
../../modules/home-manager/nvim
]; ];
user.nvim.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
sshfs sshfs
just just

View file

@ -9,8 +9,13 @@
../../modules/home-manager/terminal/nushell ../../modules/home-manager/terminal/nushell
../../modules/home-manager/terminal/starship.nix ../../modules/home-manager/terminal/starship.nix
../../modules/home-manager/terminal/tiny-irc.nix ../../modules/home-manager/terminal/tiny-irc.nix
../../modules/home-manager/nvim
]; ];
user.nvim = {
enable-lsp = true;
enable-treesitter = true;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
tre-command tre-command
diskonaut diskonaut

View file

@ -6,12 +6,12 @@
}: { }: {
programs.steam = { programs.steam = {
enable = true; enable = true;
extraCompatPackages = with pkgs;[ extraCompatPackages = with pkgs; [
proton-ge-bin proton-ge-bin
]; ];
gamescopeSession.enable=true; gamescopeSession.enable = true;
}; };
programs.gamemode.enable=true; programs.gamemode.enable = true;
hardware.steam-hardware.enable = true; hardware.steam-hardware.enable = true;
} }

View file

@ -3,9 +3,9 @@
outputs, outputs,
... ...
}: { }: {
default={ default = {
path=./default; path = ./default;
description="a basic blank devshell flake"; description = "a basic blank devshell flake";
}; };
hugo = { hugo = {
path = ./hugo; path = ./hugo;