Compare commits
4 commits
60a5ce3f42
...
ed029daaa4
Author | SHA1 | Date | |
---|---|---|---|
ed029daaa4 | |||
86846bdace | |||
23d8c67aed | |||
26d60069f6 |
6 changed files with 150 additions and 227 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, lib, sources, ... }:
|
||||
with lib;
|
||||
let
|
||||
zsh = import ./zsh.nix;
|
||||
|
@ -10,6 +10,7 @@ in
|
|||
imports = [
|
||||
zsh.user
|
||||
./neovim
|
||||
((import sources.nixvim).homeManagerModules.nixvim)
|
||||
];
|
||||
# options.kat = {
|
||||
# ssh = mkEnableOption "ssh configuration";
|
||||
|
|
|
@ -10,29 +10,106 @@ with lib;
|
|||
default = true;
|
||||
};
|
||||
config = mkIf config.kat.neovim {
|
||||
programs.neovim = {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
|
||||
nvim-treesitter.withAllGrammars
|
||||
vim-nix
|
||||
|
||||
telescope-nvim
|
||||
todo-comments-nvim
|
||||
|
||||
gitsigns-nvim
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
git
|
||||
ripgrep
|
||||
fd
|
||||
gcc
|
||||
];
|
||||
extraConfig = builtins.readFile ./nvimrc;
|
||||
extraLuaConfig = builtins.readFile ./nvim.lua;
|
||||
vimdiffAlias = true;
|
||||
vimAlias = true;
|
||||
viAlias = true;
|
||||
colorschemes.dracula-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
colors = {
|
||||
bg = "#000000";
|
||||
black = "#000000";
|
||||
};
|
||||
transparent_bg = true;
|
||||
overrides.__raw = ''
|
||||
function (colors) return {
|
||||
LineNr = { bg = "#181818", fg = colors.purple },
|
||||
CursorLine = { },
|
||||
CursorLineNr = { fg = "#FFFF00", bg = colors.black, bold = true },
|
||||
StatusLine = { fg = colors.bright_white, bg = colors.black },
|
||||
} end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
opts = {
|
||||
foldlevelstart = 99;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
cursorline = true;
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
expandtab = true;
|
||||
};
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
command = "set relativenumber";
|
||||
event = [ "InsertLeave" ];
|
||||
}
|
||||
{
|
||||
command = "set norelativenumber";
|
||||
event = [ "InsertEnter" ];
|
||||
}
|
||||
];
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
action = ":set number!<CR>";
|
||||
key = "<F2>";
|
||||
}
|
||||
{
|
||||
action = ":set relativenumber!<CR>";
|
||||
key = "<F3>";
|
||||
}
|
||||
{
|
||||
action = ''"*ygv'';
|
||||
key = "<LeftRelease>";
|
||||
mode = [ "v" ];
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
nix.enable = true;
|
||||
|
||||
treesitter = {
|
||||
enable = true;
|
||||
folding = true;
|
||||
settings.highlight.enable = true;
|
||||
};
|
||||
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"ff".action = "find_files";
|
||||
"fg".action = "live_grep";
|
||||
"fb".action = "buffers";
|
||||
};
|
||||
settings.pickers.buffers.mappings = rec {
|
||||
i."<c-d>".__raw = "require('telescope.actions').delete_buffer";
|
||||
n = i;
|
||||
};
|
||||
};
|
||||
|
||||
web-devicons.enable = true;
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
nixd.enable = true;
|
||||
pylsp.enable = true;
|
||||
clangd.enable = true;
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
local actions = require('telescope.actions')
|
||||
|
||||
require("telescope").setup {
|
||||
pickers = {
|
||||
buffers = {
|
||||
show_all_buffers = true,
|
||||
sort_lastused = true,
|
||||
--theme = "dropdown",
|
||||
--previewer = false,
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-d>"] = actions.delete_buffer,
|
||||
},
|
||||
n = {
|
||||
["<c-d>"] = actions.delete_buffer,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,167 +0,0 @@
|
|||
let &packpath = &runtimepath
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
|
||||
" Use :help 'option' to see the documentation for the given option.
|
||||
|
||||
set autoindent
|
||||
set backspace=indent,eol,start
|
||||
set complete-=i
|
||||
set smarttab
|
||||
|
||||
let g:mapleader=";"
|
||||
|
||||
set nrformats-=octal
|
||||
|
||||
set ttimeout
|
||||
set ttimeoutlen=100
|
||||
|
||||
set incsearch
|
||||
|
||||
" Use <C-L> to clear the highlighting of :set hlsearch.
|
||||
if maparg('<C-L>', 'n') ==# ''
|
||||
nnoremap <silent> <C-L> :nohlsearch<CR><C-L>
|
||||
endif
|
||||
|
||||
set laststatus=2
|
||||
set ruler
|
||||
set showcmd
|
||||
set wildmenu
|
||||
|
||||
if !&scrolloff
|
||||
set scrolloff=1
|
||||
endif
|
||||
if !&sidescrolloff
|
||||
set sidescrolloff=5
|
||||
endif
|
||||
set display+=lastline
|
||||
|
||||
if &listchars ==# 'eol:$'
|
||||
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
||||
endif
|
||||
|
||||
if v:version > 703 || v:version == 703 && has("patch541")
|
||||
set formatoptions+=j " Delete comment character when joining commented lines
|
||||
endif
|
||||
|
||||
if has('path_extra')
|
||||
setglobal tags-=./tags tags^=./tags;
|
||||
endif
|
||||
|
||||
set autoread
|
||||
|
||||
if &history < 1000
|
||||
set history=1000
|
||||
endif
|
||||
if &tabpagemax < 50
|
||||
set tabpagemax=50
|
||||
endif
|
||||
if !empty(&viminfo)
|
||||
set viminfo^=!
|
||||
endif
|
||||
set sessionoptions-=options
|
||||
|
||||
" Allow color schemes to do bright colors without forcing bold.
|
||||
if &t_Co == 8 && $TERM !~# '^linux'
|
||||
set t_Co=16
|
||||
endif
|
||||
|
||||
" Load matchit.vim, but only if the user hasn't installed a newer version.
|
||||
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
|
||||
runtime! macros/matchit.vim
|
||||
endif
|
||||
|
||||
inoremap <C-U> <C-G>u<C-U>
|
||||
set mouse=a
|
||||
vmap <LeftRelease> "*ygv
|
||||
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set expandtab
|
||||
|
||||
syntax enable
|
||||
|
||||
nnoremap ff <cmd>Telescope find_files<cr>
|
||||
nnoremap fg <cmd>Telescope live_grep<cr>
|
||||
nnoremap fb <cmd>Telescope buffers<cr>
|
||||
|
||||
" let g:coqtail_nomap = 1
|
||||
"
|
||||
" function Coqfun(count, cmd)
|
||||
" if a:count == 0
|
||||
" let l:count=1
|
||||
" else
|
||||
" let l:count=a:count
|
||||
" endif
|
||||
" execute a:cmd . l:count
|
||||
" endfunction
|
||||
"
|
||||
" map <A-c> :CoqStart<CR>
|
||||
" map <A-q> :CoqStop<CR>
|
||||
" map <A-j> :<C-U>call Coqfun(v:count,"CoqNext")<CR>
|
||||
" map <A-k> :<C-U>call Coqfun(v:count,"CoqUndo")<CR>
|
||||
" map <A-l> :CoqToLine<CR>
|
||||
" imap <A-j> <C-O>:call Coqfun(v:count,"CoqNext")<CR>
|
||||
" imap <A-k> <C-O>:call Coqfun(v:count,"CoqUndo")<CR>
|
||||
" imap <A-l> <C-O>:CoqToLine<CR>
|
||||
"
|
||||
" au BufRead,BufNewFile *.lus,*.ept setlocal filetype=lustre
|
||||
|
||||
""""""""""""""""""""""""""""""""" Colors
|
||||
nnoremap <C-J> a<CR><Esc>k$
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name = "perso"
|
||||
|
||||
set cursorline
|
||||
set number
|
||||
set relativenumber
|
||||
|
||||
autocmd InsertEnter * set relativenumber!
|
||||
autocmd InsertLeave * set relativenumber!
|
||||
|
||||
map <F2> :set number!<CR>
|
||||
map <F3> :set relativenumber!<CR>
|
||||
|
||||
colorscheme vim
|
||||
set notermguicolors
|
||||
|
||||
hi Normal guifg=cyan guibg=black
|
||||
hi NonText guifg=yellow guibg=#303030
|
||||
hi comment guifg=green
|
||||
hi constant guifg=cyan gui=bold
|
||||
hi identifier guifg=cyan gui=NONE
|
||||
hi statement guifg=lightblue gui=NONE
|
||||
hi preproc guifg=Pink2
|
||||
hi type guifg=seagreen gui=bold
|
||||
hi special guifg=yellow
|
||||
hi ErrorMsg guifg=Black guibg=Red
|
||||
hi WarningMsg guifg=Black guibg=Green
|
||||
hi Error guibg=Red
|
||||
hi Todo guifg=Black guibg=orange
|
||||
hi Cursor guibg=#60a060 guifg=#00ff00
|
||||
hi Search guibg=darkgray guifg=black gui=bold
|
||||
hi IncSearch gui=NONE guibg=steelblue
|
||||
hi LineNr guifg=darkgrey ctermbg=234 ctermfg=141
|
||||
hi CursorLine cterm = NONE
|
||||
hi CursorLineNR cterm=NONE ctermbg=black
|
||||
hi title guifg=darkgrey
|
||||
hi ShowMarksHL ctermfg=cyan ctermbg=lightblue cterm=bold guifg=yellow guibg=black gui=bold
|
||||
hi StatusLineNC gui=NONE guifg=lightblue guibg=darkblue
|
||||
hi StatusLine gui=bold guifg=cyan guibg=blue
|
||||
hi label guifg=gold2
|
||||
hi operator guifg=orange
|
||||
hi clear Visual
|
||||
hi Visual term=reverse cterm=reverse gui=reverse
|
||||
hi DiffChange guibg=darkgreen
|
||||
hi DiffText guibg=olivedrab
|
||||
hi DiffAdd guibg=slateblue
|
||||
hi DiffDelete guibg=coral
|
||||
hi Folded guibg=gray30
|
||||
hi FoldColumn guibg=gray30 guifg=white
|
||||
hi cIf0 guifg=gray
|
||||
hi diffOnly guifg=red gui=bold
|
|
@ -29,6 +29,7 @@
|
|||
aliases = [
|
||||
"www.katvayor.net"
|
||||
"katvayor.net"
|
||||
"netbox.katvayor.net"
|
||||
];
|
||||
ip = "192.168.122.7";
|
||||
};
|
||||
|
@ -68,10 +69,12 @@
|
|||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "root@katvayor.net";
|
||||
certs."website.katvayor.net".extraDomainNames = [ "netbox.katvayor.net" ];
|
||||
};
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
qemuGuest.enable = true;
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
|
@ -87,9 +90,29 @@
|
|||
index = "index.html";
|
||||
};
|
||||
};
|
||||
"netbox.katvayor.net" = {
|
||||
useACMEHost = "website.katvayor.net";
|
||||
addSSL = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
recommendedProxySettings = true;
|
||||
proxyPass = "http://localhost:8001";
|
||||
};
|
||||
"/static/".alias = "${config.services.netbox.dataDir}/static/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
netbox = {
|
||||
enable = true;
|
||||
package = pkgs.netbox_4_1;
|
||||
listenAddress = "127.0.0.1";
|
||||
secretKeyFile = "${config.services.netbox.dataDir}/secret.key";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.nginx.extraGroups = [ "netbox" ];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
"pre_releases": false,
|
||||
"version_upper_bound": null,
|
||||
"release_prefix": null,
|
||||
"version": "v1.8.2",
|
||||
"revision": "0a97c6683ecb8d92ab0ce4c3c39e896e4a3fe388",
|
||||
"url": "https://api.github.com/repos/nix-community/disko/tarball/v1.8.2",
|
||||
"hash": "1xivgibk1fa07z4xqxpyha6yyb0pmahf52caf1kgh8zxr231ai1v"
|
||||
"version": "v1.9.0",
|
||||
"revision": "49a4936cee640e27d74baee6fd1278285d29b100",
|
||||
"url": "https://api.github.com/repos/nix-community/disko/tarball/v1.9.0",
|
||||
"hash": "0j76ar4qz320fakdii4659w5lww8wiz6yb7g47npywqvf2lbp388"
|
||||
},
|
||||
"home-manager": {
|
||||
"type": "Git",
|
||||
|
@ -23,9 +23,9 @@
|
|||
"repo": "home-manager"
|
||||
},
|
||||
"branch": "master",
|
||||
"revision": "fe56302339bb28e3471632379d733547caec8103",
|
||||
"url": "https://github.com/nix-community/home-manager/archive/fe56302339bb28e3471632379d733547caec8103.tar.gz",
|
||||
"hash": "12j7h79lb17pysqqq4ixi92y3h07nvv9ymhmysr6hqiwwpaadn8f"
|
||||
"revision": "e83414058edd339148dc142a8437edb9450574c8",
|
||||
"url": "https://github.com/nix-community/home-manager/archive/e83414058edd339148dc142a8437edb9450574c8.tar.gz",
|
||||
"hash": "0kg9iaixqygpncw7avgh1grwyjgnfc9i7k9pk8hc4xrvr8jv2l3c"
|
||||
},
|
||||
"nix-patches": {
|
||||
"type": "GitRelease",
|
||||
|
@ -49,30 +49,39 @@
|
|||
"repo": "nixos-images"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "3103f26e0631a543963c03c583f03fd42fd9d51a",
|
||||
"url": "https://github.com/nix-community/nixos-images/archive/3103f26e0631a543963c03c583f03fd42fd9d51a.tar.gz",
|
||||
"hash": "0as4f6px5dn465v2ndcw42w0hb8rnz4an9ijwlskdsmcdycf0qil"
|
||||
"revision": "16f7f3496167ff95a1ef823bf56309a5d42237e1",
|
||||
"url": "https://github.com/nix-community/nixos-images/archive/16f7f3496167ff95a1ef823bf56309a5d42237e1.tar.gz",
|
||||
"hash": "0nwpxajd6ny9qry58ch624ahr4nmsbkxq1m9ijqcwk8jx0cgv3vy"
|
||||
},
|
||||
"nixos-mailserver": {
|
||||
"type": "GitRelease",
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitLab",
|
||||
"repo_path": "simple-nixos-mailserver/nixos-mailserver",
|
||||
"server": "https://gitlab.com/"
|
||||
},
|
||||
"pre_releases": false,
|
||||
"version_upper_bound": null,
|
||||
"release_prefix": null,
|
||||
"version": "v2.3.0",
|
||||
"revision": "289f71efe2250e1155b0c74d188699397ba641d8",
|
||||
"url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?ref=v2.3.0",
|
||||
"hash": "1flgj5hqzr76x2ff339kzbrfwilwy81wmml69nnwr2l5apmmly8j"
|
||||
"branch": "master",
|
||||
"revision": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2",
|
||||
"url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=af7d3bf5daeba3fc28089b015c0dd43f06b176f2",
|
||||
"hash": "1j0r52ij5pw8b8wc5xz1bmm5idwkmsnwpla6smz8gypcjls860ma"
|
||||
},
|
||||
"nixpkgs": {
|
||||
"type": "Channel",
|
||||
"name": "nixpkgs-unstable",
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre694416.ccc0c2126893/nixexprs.tar.xz",
|
||||
"hash": "0cn1z4wzps8nfqxzr6l5mbn81adcqy2cy2ic70z13fhzicmxfsbx"
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre698484.30c9efeef01e/nixexprs.tar.xz",
|
||||
"hash": "079c53r3wryasv3ghyi2da9ipxh1bfh2pl63yj447bilh5ghjhhz"
|
||||
},
|
||||
"nixvim": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "42ea1626cb002fa759a6b1e2841bfc80a4e59615",
|
||||
"url": "https://github.com/nix-community/nixvim/archive/42ea1626cb002fa759a6b1e2841bfc80a4e59615.tar.gz",
|
||||
"hash": "0ajfx35h4z3814p2cpbz4yh0ds948h9x8kgv7kbqnjjjlh72jgp7"
|
||||
}
|
||||
},
|
||||
"version": 3
|
||||
|
|
Loading…
Reference in a new issue