Merge remote-tracking branch 'origin/nixos' into nixos-work
This commit is contained in:
commit
2259523325
19 changed files with 273 additions and 205 deletions
|
|
@ -17,7 +17,7 @@ in
|
|||
};
|
||||
aliases = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (nullOr (either str path));
|
||||
type = with types; attrsOf str;
|
||||
};
|
||||
variables = mkOption {
|
||||
default = { };
|
||||
|
|
|
|||
|
|
@ -36,6 +36,20 @@ in
|
|||
{
|
||||
home-manager.users.moritz = {
|
||||
programs = {
|
||||
fzf.colors = {
|
||||
"bg+" = "#${surface0}";
|
||||
"fg+" = "#${text}";
|
||||
"hl+" = "#${red}";
|
||||
bg = "#${base}";
|
||||
fg = "#${text}";
|
||||
header = "#${red}";
|
||||
hl = "#${red}";
|
||||
info = "#${mauve}";
|
||||
marker = "#${rosewater}";
|
||||
pointer = "#${rosewater}";
|
||||
prompt = "#${mauve}";
|
||||
spinner = "#${rosewater}";
|
||||
};
|
||||
kitty.extraConfig = ''
|
||||
# vim:ft=kitty
|
||||
|
||||
|
|
|
|||
|
|
@ -4,22 +4,36 @@ with lib;
|
|||
let
|
||||
cfg = config.my.theming;
|
||||
|
||||
background = "#282a36";
|
||||
currentLine = "#44475a";
|
||||
foreground = "#f8f8f2";
|
||||
comment = "#6272a4";
|
||||
cyan = "#8be9fd";
|
||||
green = "#50fa7b";
|
||||
orange = "#ffb86c";
|
||||
pink = "#ff79c6";
|
||||
purple = "#bd93f9";
|
||||
red = "#ff5555";
|
||||
yellow = "#f1fa8c";
|
||||
background = "282a36";
|
||||
currentLine = "44475a";
|
||||
foreground = "f8f8f2";
|
||||
comment = "6272a4";
|
||||
cyan = "8be9fd";
|
||||
green = "50fa7b";
|
||||
orange = "ffb86c";
|
||||
pink = "ff79c6";
|
||||
purple = "bd93f9";
|
||||
red = "ff5555";
|
||||
yellow = "f1fa8c";
|
||||
in
|
||||
{
|
||||
config = mkIf (cfg.enable && cfg.scheme == "dracula") {
|
||||
home-manager.users.moritz = {
|
||||
programs = {
|
||||
fzf.colors = {
|
||||
"bg+" = "#${currentLine}";
|
||||
"fg+" = "#${foreground}";
|
||||
"hl+" = "#${purple}";
|
||||
bg = "#${background}";
|
||||
fg = "#${foreground}";
|
||||
header = "#${comment}";
|
||||
hl = "#${purple}";
|
||||
info = "#${orange}";
|
||||
marker = "#${pink}";
|
||||
pointer = "#${pink}";
|
||||
prompt = "#${green}";
|
||||
spinner = "#${orange}";
|
||||
};
|
||||
kitty.extraConfig =
|
||||
''
|
||||
# https://draculatheme.com/kitty
|
||||
|
|
@ -142,9 +156,9 @@ in
|
|||
};
|
||||
xsession.windowManager.bspwm = {
|
||||
settings = {
|
||||
focused_border_color = purple;
|
||||
normal_border_color = background;
|
||||
active_border_color = background;
|
||||
focused_border_color = "#${purple}";
|
||||
normal_border_color = "#${background}";
|
||||
active_border_color = "#${background}";
|
||||
};
|
||||
};
|
||||
services = {
|
||||
|
|
@ -181,42 +195,43 @@ in
|
|||
polybar = {
|
||||
config = {
|
||||
"bar/bottom" = {
|
||||
inherit background foreground;
|
||||
border-color = background;
|
||||
background = "#${background}";
|
||||
foreground = "#${foreground}";
|
||||
border-color = "#${background}";
|
||||
};
|
||||
"module/bspwm" = {
|
||||
label-focused-foreground = pink;
|
||||
label-occupied-foreground = comment;
|
||||
label-urgent-foreground = red;
|
||||
label-empty-foreground = currentLine;
|
||||
label-separator-foreground = background;
|
||||
label-focused-foreground = "#${pink}";
|
||||
label-occupied-foreground = "#${comment}";
|
||||
label-urgent-foreground = "#${red}";
|
||||
label-empty-foreground = "#${currentLine}";
|
||||
label-separator-foreground = "#${background}";
|
||||
};
|
||||
"module/cpu" = {
|
||||
format-foreground = background;
|
||||
format-background = green;
|
||||
format-foreground = "#${background}";
|
||||
format-background = "#${green}";
|
||||
};
|
||||
"module/time" = {
|
||||
format-foreground = background;
|
||||
format-background = cyan;
|
||||
format-foreground = "#${background}";
|
||||
format-background = "#${cyan}";
|
||||
};
|
||||
"module/date" = {
|
||||
format-foreground = background;
|
||||
format-background = yellow;
|
||||
format-foreground = "#${background}";
|
||||
format-background = "#${yellow}";
|
||||
};
|
||||
"module/memory" = {
|
||||
format-foreground = background;
|
||||
format-background = cyan;
|
||||
format-foreground = "#${background}";
|
||||
format-background = "#${cyan}";
|
||||
};
|
||||
"module/pulseaudio" = {
|
||||
format-volume-foreground = background;
|
||||
format-volume-background = purple;
|
||||
label-muted = "%{F${red}}婢 %{F${background}}muted";
|
||||
format-muted-foreground = background;
|
||||
format-muted-background = red;
|
||||
format-volume-foreground = "#${background}";
|
||||
format-volume-background = "#${purple}";
|
||||
label-muted = "%{F#${red}}婢 %{F#${background}}muted";
|
||||
format-muted-foreground = "#${background}";
|
||||
format-muted-background = "#${red}";
|
||||
};
|
||||
"module/network" = {
|
||||
format-connected-foreground = background;
|
||||
format-connected-background = purple;
|
||||
format-connected-foreground = "#${background}";
|
||||
format-connected-background = "#${purple}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ in
|
|||
aliases = {
|
||||
ls = "exa -lh --icons --git";
|
||||
cat = "bat";
|
||||
grep = "rg";
|
||||
rm = "rm -i";
|
||||
mv = "mv -i";
|
||||
cd = "z";
|
||||
|
|
@ -137,8 +136,14 @@ in
|
|||
programs = {
|
||||
# Let Home Manager install and manage itself.
|
||||
home-manager.enable = true;
|
||||
fzf.enable = true;
|
||||
fzf = {
|
||||
enable = true;
|
||||
defaultOptions = [
|
||||
"--height 50%"
|
||||
];
|
||||
};
|
||||
zoxide.enable = true;
|
||||
navi.enable = true;
|
||||
};
|
||||
home = {
|
||||
username = "moritz";
|
||||
|
|
|
|||
|
|
@ -116,9 +116,9 @@ with lib; {
|
|||
calibre
|
||||
jellyfin-media-player
|
||||
keepassxc
|
||||
libreoffice
|
||||
stable.libreoffice # HACK to fix build error
|
||||
pavucontrol
|
||||
signal-desktop
|
||||
stable.signal-desktop
|
||||
tlaplusToolbox
|
||||
vlc
|
||||
thunderbird
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ in
|
|||
shellAliases = shellConfig.aliases;
|
||||
|
||||
shellInit = ''
|
||||
fzf_configure_bindings --git_log=\cg
|
||||
|
||||
# Vi Mode
|
||||
fish_vi_key_bindings
|
||||
|
||||
|
|
@ -74,8 +72,6 @@ in
|
|||
cheat = "cht.sh $argv | bat -p";
|
||||
};
|
||||
};
|
||||
fzf.enableFishIntegration = true;
|
||||
starship.enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,7 +41,11 @@ in
|
|||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
extraLuaConfig = builtins.readFile ./init.lua;
|
||||
extraLuaConfig = lib.concatLines (
|
||||
builtins.map
|
||||
builtins.readFile
|
||||
[ ./options.lua ./keybinds.lua ./init.lua ]
|
||||
);
|
||||
extraPackages = with pkgs; [
|
||||
alejandra
|
||||
black
|
||||
|
|
|
|||
|
|
@ -1,46 +1,5 @@
|
|||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
-- FIX to create spell dir if not existent
|
||||
local spelldir = vim.fn.stdpath("data") .. "/site/spell"
|
||||
if not vim.loop.fs_stat(spelldir) then
|
||||
vim.fn.mkdir(spelldir, "p")
|
||||
end
|
||||
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.backupdir = { vim.fn.stdpath("state") .. "/nvim/backup/" } -- don't store backup in files dir
|
||||
vim.opt.clipboard = "unnamedplus" -- sync with system clipboard
|
||||
vim.opt.conceallevel = 2
|
||||
vim.opt.expandtab = true -- spaces instead of tabs
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.mouse = "a" -- mouse for all modes
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.scrolloff = 4 -- lines of context
|
||||
vim.opt.shiftround = true -- round indent
|
||||
vim.opt.shiftwidth = 0 -- use tabstop value
|
||||
vim.opt.shortmess:append({ c = true })
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undolevels = 10000
|
||||
vim.opt.updatetime = 300
|
||||
vim.opt_local.spell = true
|
||||
vim.opt_local.spelllang = { "en", "de_20" } -- all English regions and new German spelling
|
||||
|
||||
if vim.g.neovide then
|
||||
vim.opt.guifont = "Fira Code Nerd Font:h10"
|
||||
vim.g.neovide_scale_factor = 0.7
|
||||
end
|
||||
|
||||
require("impatient")
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
require("nvim-treesitter.configs").setup({
|
||||
sync_install = false,
|
||||
auto_install = false,
|
||||
|
|
@ -181,7 +140,7 @@ vim.o.statuscolumn = "%= "
|
|||
.. "%= " -- spacing between end of column and start of text
|
||||
|
||||
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
||||
wk.register({
|
||||
require("which-key").register({
|
||||
z = {
|
||||
R = { require("ufo").openAllFolds, "Open all folds" },
|
||||
M = { require("ufo").closeAllFolds, "Close all folds" },
|
||||
|
|
@ -210,7 +169,7 @@ require("lspsaga").setup({
|
|||
|
||||
local lspconfig = require("lspconfig")
|
||||
local on_attach_def = function(_, bufnr)
|
||||
wk.register({
|
||||
require("which-key").register({
|
||||
K = { "<cmd>Lspsaga hover_doc ++quiet<cr>", "show info" },
|
||||
["<leader>"] = {
|
||||
l = {
|
||||
|
|
|
|||
21
modules/programs/nvim/keybinds.lua
Normal file
21
modules/programs/nvim/keybinds.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-- buffers
|
||||
require("which-key").register({
|
||||
b = {
|
||||
name = "buffers",
|
||||
b = { "<cmd>Telescope buffers<cr>", "List buffers" },
|
||||
d = { "<cmd>bd<cr>", "Delete buffer" },
|
||||
n = { "<cmd>bnext<cr>", "Next buffer" },
|
||||
p = { "<cmd>bprevious<cr>", "Previous buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Clear search with <esc>
|
||||
require("which-key").register({
|
||||
["<esc>"] = { "<cmd>noh<cr><esc>", "Escape and clear hlsearch", mode = { "n", "i" } },
|
||||
})
|
||||
|
||||
-- better indenting
|
||||
require("which-key").register({
|
||||
["<"] = { "<gv", "Shift left" },
|
||||
[">"] = { ">gv", "Shift right" },
|
||||
}, { mode = "v" })
|
||||
38
modules/programs/nvim/options.lua
Normal file
38
modules/programs/nvim/options.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
-- FIX to create spell dir if not existent
|
||||
local spelldir = vim.fn.stdpath("data") .. "/site/spell"
|
||||
if not vim.loop.fs_stat(spelldir) then
|
||||
vim.fn.mkdir(spelldir, "p")
|
||||
end
|
||||
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.backupdir = { vim.fn.stdpath("state") .. "/nvim/backup/" } -- don't store backup in files dir
|
||||
vim.opt.clipboard = "unnamedplus" -- sync with system clipboard
|
||||
vim.opt.conceallevel = 2
|
||||
vim.opt.expandtab = true -- spaces instead of tabs
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.mouse = "a" -- mouse for all modes
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.scrolloff = 4 -- lines of context
|
||||
vim.opt.shiftround = true -- round indent
|
||||
vim.opt.shiftwidth = 0 -- use tabstop value
|
||||
vim.opt.shortmess:append({ c = true })
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undolevels = 10000
|
||||
vim.opt.updatetime = 300
|
||||
vim.opt_local.spell = true
|
||||
vim.opt_local.spelllang = { "en", "de_20" } -- all English regions and new German spelling
|
||||
|
||||
if vim.g.neovide then
|
||||
vim.opt.guifont = "Fira Code Nerd Font:h10"
|
||||
vim.g.neovide_scale_factor = 0.7
|
||||
end
|
||||
2
modules/programs/nvim/plugins/bufferline-nvim.lua
Normal file
2
modules/programs/nvim/plugins/bufferline-nvim.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.opt.termguicolors = true
|
||||
require("bufferline").setup()
|
||||
1
modules/programs/nvim/plugins/comment-box-nvim.lua
Normal file
1
modules/programs/nvim/plugins/comment-box-nvim.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
require("comment-box").setup()
|
||||
|
|
@ -1 +1,6 @@
|
|||
require("nvim-autopairs").setup()
|
||||
|
||||
-- If you want insert `(` after select function or method item
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local cmp = require("cmp")
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
|
|
|
|||
1
modules/programs/nvim/plugins/oil-nvim.lua
Normal file
1
modules/programs/nvim/plugins/oil-nvim.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
require("oil").setup()
|
||||
|
|
@ -31,12 +31,6 @@ in
|
|||
readlink -f $(which $1)
|
||||
}
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "forgit";
|
||||
src = inputs.forgit-git;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue