added stuff

This commit is contained in:
vali 2024-04-09 23:11:33 +02:00
commit 7d4f626b7d
907 changed files with 70990 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{
config,
lib,
...
}: let
inherit (lib) optionalString;
in {
imports = [
./system
];
services.getty.helpLine =
''
The "nixos" and "root" accounts have empty passwords.
An ssh daemon is running. You then must set a password
for either "root" or "nixos" with `passwd` or add an ssh key
to /home/nixos/.ssh/authorized_keys be able to login.
If you need a wireless connection, you may use networkmanager
by invoking `nmcli` or `nmtui`, the ncurses interface.
''
+ optionalString config.services.xserver.enable ''
Type `sudo systemctl start display-manager' to
start the graphical user interface.
'';
# since we don't inherit the core module, this needs to be set here manually
# otherwise we'll see the stateVersion error - which doesn't actually matter inside the ISO
# but still annoying and slows down nix flake check
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,5 @@
{
imports = [
./programs
];
}

View file

@ -0,0 +1,7 @@
{
imports = [
./neovim
./git.nix
];
}

View file

@ -0,0 +1,6 @@
{
programs.git = {
enable = true;
lfs.enable = true;
};
}

View file

@ -0,0 +1,71 @@
"vi:filetype=vim
" add ~/.vim to the beginning of the runtimepath
set runtimepath^=~/.vim
" set the packpath to the runtimepath
let &packpath = &runtimepath
" for plugins to load correctly
filetype plugin indent on
" don't try to be vi compatible
set nocompatible
" use system clipboard
set clipboard+=unnamedplus
" syntax highlighting
syntax enable
" display line numbers
set number relativenumber
" enable mouse support in all modes
set mouse=a
" set indentation to spaces instead of tabs
set noexpandtab
" number of spaces to use for each step of (auto)indent
set shiftwidth=2
" number of spaces that a <Tab> in the file counts for
set tabstop=2
" C-style indenting
set cindent
" 'smart' indenting
set smartindent
" set the indent of new lines
set autoindent
" set the folding method based on syntax
set foldmethod=syntax
" spaces instead of tabs for indentation
set expandtab
" 'smart' tabs that respects 'shiftwidth' for indentation
set smarttab
" number of spaces a <Tab> in the file counts for
set tabstop=4
" number of spaces to use for each step of (auto)indent
set shiftwidth=0
" define backspace behavior in insert mode:
" - 'indent': allows backspace to delete auto-indentation at the start of a line
" - 'eol': enables backspace to delete the end-of-line character, acting as line deletion
" - 'start': allows backspace to delete past the start of insert or typeahead
set backspace=indent,eol,start
" spell Checking
set spelllang=en " spell check langs
set spellsuggest=best,9 " suggestions for spelling corrections

View file

@ -0,0 +1,9 @@
" map key <F2> to toggle between hiding/showing current line
nmap <F2> zA
" map key <F3> to toggle between reducing/enlarging fold level
nmap <F3> zR
" map key <F4> to fold everything except the cursor line
nmap <F4> zM

View file

@ -0,0 +1,16 @@
" customize label for vim-sneak
let g:sneak#label = 1
" Toggle spell checking in normal mode
nnoremap <silent> <F3> :set spell!<CR>
" Toggle spell checking in insert mode
inoremap <silent> <F3> <C-O>:set spell!<CR>
lua << EOF
require('nvim-treesitter.configs').setup {
highlight = {
enable = true
}
}
EOF

View file

@ -0,0 +1,73 @@
{pkgs, ...}: let
inherit (builtins) readFile;
in {
programs = {
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
configure = {
customRC = ''
" -- init --
${readFile ./config/init.vim}
" -- mappings --
${readFile ./config/maps.vim}
" -- plugin configs --
${readFile ./config/plugins.vim}
'';
packages.myVimPackage = with pkgs.vimPlugins; {
start = [
# general utils
direnv-vim # direnv for vim
dressing-nvim # better UI components
leap-nvim # navigation
lualine-nvim # statusline
tabular # align text according to regexp
undotree # undo history
vim-css-color # highlight CSS colors
vim-signature # marks on signcolumn
which-key-nvim # mapping manager and cheatsheet
vim-sneak
# completion
nvim-cmp
cmp-buffer
cmp-cmdline
cmp-nvim-lsp
cmp-path
cmp_luasnip
comment-nvim
todo-comments-nvim
luasnip
friendly-snippets
nvim-lspconfig
nvim-lint
fidget-nvim
aerial-nvim
telescope-nvim # list of files interface
telescope-file-browser-nvim
telescope-fzy-native-nvim
vim-fugitive # git in vim
gitsigns-nvim
targets-vim # text objects
vim-surround
vim-expand-region
nvim-treesitter.withAllGrammars # better highlighting
];
};
};
};
};
}