From 41c2d668f74245c0b45ff03412a5eed94c157643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 13 Jul 2023 15:53:10 +0200 Subject: [PATCH 01/14] feat: use nnn and treesitter vifm is removed in favour of nnn, with the keybindings in nvim being changed. TODO: improve the colorscheme of `nnn` to match `ls`. All nvim plugins that were responsible for language syntax highlighting are removed in favour of treesitter[1], a syntax highlighter that parses AST instead of being regex-based. This is still experimental, but my tests so far have not encountered any issues. 1) https://github.com/nvim-treesitter/nvim-treesitter --- .../config/config.d/custom-keybindings.conf | 3 - modules/terminal-life/bash/default.nix | 3 +- modules/terminal-life/default.nix | 9 +- ...1-feat-use-wasd-keybindings-for-jkli.patch | 38 ++ modules/terminal-life/nvim/default.nix | 64 ++- modules/terminal-life/nvim/init.vim | 3 + modules/terminal-life/nvim/plugins.vim | 2 + profiles/base-user/.config/git/gitmessage.nix | 22 +- .../base-user/.config/vifm/colors/base16.vifm | 26 - profiles/base-user/.config/vifm/vifmrc | 495 ------------------ profiles/base-user/home.nix | 2 - profiles/base-user/session-variables.nix | 17 + 12 files changed, 133 insertions(+), 551 deletions(-) create mode 100644 modules/terminal-life/nnn/0001-feat-use-wasd-keybindings-for-jkli.patch delete mode 100644 profiles/base-user/.config/vifm/colors/base16.vifm delete mode 100644 profiles/base-user/.config/vifm/vifmrc diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index 1b851675..317667a0 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -18,9 +18,6 @@ bindsym $mod+Shift+h exec psos help bindsym $mod+F2 exec firefox -bindsym $mod+F3 exec $term -e vifm -bindsym $mod+Shift+F3 exec gksu $term -e vifm - bindsym $mod+F4 exec nautilus -w bindsym $mod+Shift+F4 exec signal-desktop --use-tray-icon diff --git a/modules/terminal-life/bash/default.nix b/modules/terminal-life/bash/default.nix index 3d0c7311..29698df0 100644 --- a/modules/terminal-life/bash/default.nix +++ b/modules/terminal-life/bash/default.nix @@ -100,8 +100,6 @@ in { mutt = "neomutt"; ls = "exa"; la = "exa --group-directories-first -lag"; - fm = "vifm ."; - vifm = "vifm ."; wget = "wget --hsts-file=$XDG_CACHE_HOME/wget-hsts"; irssi = "irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_DATA_HOME/irssi"; drone = "DRONE_TOKEN=$(secret-tool lookup drone token) drone"; @@ -109,5 +107,6 @@ in { # fix nixos-option nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; + nnn = "nnn -d -e -H -r"; }; } diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 047eb3bd..ee7a17fe 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -47,10 +47,15 @@ in { gh glow jump - nnn + (nnn.overrideAttrs (o: { + patches = + (o.patches or []) + ++ [ + ./nnn/0001-feat-use-wasd-keybindings-for-jkli.patch + ]; + })) powerline silver-searcher - vifm watson ]; diff --git a/modules/terminal-life/nnn/0001-feat-use-wasd-keybindings-for-jkli.patch b/modules/terminal-life/nnn/0001-feat-use-wasd-keybindings-for-jkli.patch new file mode 100644 index 00000000..f06cb042 --- /dev/null +++ b/modules/terminal-life/nnn/0001-feat-use-wasd-keybindings-for-jkli.patch @@ -0,0 +1,38 @@ +From a81ee68923412c0fb8fab46f2f918a7ec865b384 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= +Date: Sun, 9 Jul 2023 04:19:51 +0200 +Subject: [PATCH] feat: use wasd keybindings for jkli + +--- + src/nnn.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/nnn.h b/src/nnn.h +index d476ddd2..5f106987 100644 +--- a/src/nnn.h ++++ b/src/nnn.h +@@ -131,7 +131,7 @@ struct key { + static struct key bindings[] = { + /* Back */ + { KEY_LEFT, SEL_BACK }, +- { 'h', SEL_BACK }, ++ { 'j', SEL_BACK }, + /* Inside or select */ + { KEY_ENTER, SEL_OPEN }, + { '\r', SEL_OPEN }, +@@ -139,10 +139,10 @@ static struct key bindings[] = { + { KEY_RIGHT, SEL_NAV_IN }, + { 'l', SEL_NAV_IN }, + /* Next */ +- { 'j', SEL_NEXT }, ++ { 'k', SEL_NEXT }, + { KEY_DOWN, SEL_NEXT }, + /* Previous */ +- { 'k', SEL_PREV }, ++ { 'i', SEL_PREV }, + { KEY_UP, SEL_PREV }, + /* Page down */ + { KEY_NPAGE, SEL_PGDN }, +-- +2.40.1 + diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index a2a2171a..b2f21bc1 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -47,6 +47,48 @@ in { plugins = with pkgs.vimPlugins; [] ++ lib.optionals (!cfg.lite) [ + (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [ + p.nix + p.markdown + p.json + p.json5 + p.yaml + + p.html + p.css + p.scss + p.typescript + p.tsx + p.javascript + p.graphql + p.vue + + p.rust + p.go + p.gomod + p.gosum + p.ruby + p.python + p.haskell + p.c + p.cpp + + p.vim + p.vimdoc + + p.sql + p.passwd + + p.gitcommit + p.gitignore + p.git_config + p.gitattributes + p.git_rebase + + p.dockerfile + p.terraform + ])) + nvim-cmp cmp-nvim-lsp cmp_luasnip @@ -57,13 +99,20 @@ in { instant-nvim-nvfetcher + # Search functionality behind :Ack ack-vim + + # The status bar in the bottom of the screen with the mode indication and file location vim-airline + + # Automatically load editorconfig files in repos to configure nvim settings editorconfig-vim + + # File browser. Use n to access nnn-vim + quick-scope suda-vim - syntastic vim-gutentags vim-vinegar vim-workspace-nvfetcher @@ -88,21 +137,8 @@ in { vim-bufkill vim-sensible - ansible-vim emmet-vim - rust-vim vim-caddyfile-nvfetcher - vim-go - vim-javascript - vim-json - SchemaStore-nvim - vim-markdown - vim-nix - vim-nixhash - vim-ruby - vim-toml - vim-vue - yats-vim ]; extraConfig = builtins.concatStringsSep "\n" [ diff --git a/modules/terminal-life/nvim/init.vim b/modules/terminal-life/nvim/init.vim index 4ce8a197..5b01f80f 100644 --- a/modules/terminal-life/nvim/init.vim +++ b/modules/terminal-life/nvim/init.vim @@ -101,3 +101,6 @@ if has("autocmd") au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif endif +nmap - :NnnPicker % +nmap n :NnnPicker % +nmap N :NnnPicker diff --git a/modules/terminal-life/nvim/plugins.vim b/modules/terminal-life/nvim/plugins.vim index 7678c476..85891b16 100644 --- a/modules/terminal-life/nvim/plugins.vim +++ b/modules/terminal-life/nvim/plugins.vim @@ -83,3 +83,5 @@ if executable('ag') let g:ackprg = 'ag --vimgrep' endif +" nnn +let g:nnn#command = 'nnn -d -e -H -r' diff --git a/profiles/base-user/.config/git/gitmessage.nix b/profiles/base-user/.config/git/gitmessage.nix index 839ca0dc..b3caf55a 100644 --- a/profiles/base-user/.config/git/gitmessage.nix +++ b/profiles/base-user/.config/git/gitmessage.nix @@ -6,19 +6,27 @@ user = config.pub-solar.user; xdg = config.home-manager.users."${user.name}".xdg; in '' - # Title: Summary, imperative, start upper case, don't end with a period - # No more than 50 chars. #### 50 chars is here: # + # What happened? + # + # fix feat build chore ci docs style refactor perf test + # + # type!(optional scope): # - # ^ Remember ending with an extra blank line - # Body: Explain *what* and *why* (not *how*). Include issue number. - # Wrap at 72 chars. ################################## which is here: # + # ^\n + # What exactly was done and why? # - # ^ Remember ending with an extra blank line - # At the end: Include Co-authored-by for all contributors. + # ^\n + # + # Any issue numbers or links? + # + # Refs: #123 + + + # ^\n # # Co-authored-by: Example Name '' diff --git a/profiles/base-user/.config/vifm/colors/base16.vifm b/profiles/base-user/.config/vifm/colors/base16.vifm deleted file mode 100644 index 70ae0ee9..00000000 --- a/profiles/base-user/.config/vifm/colors/base16.vifm +++ /dev/null @@ -1,26 +0,0 @@ -" Reset all styles first -highlight clear - -highlight Border cterm=none ctermfg=235 ctermbg=0 - -highlight TopLine cterm=none ctermfg=20 ctermbg=18 -highlight TopLineSel cterm=none ctermfg=1 ctermbg=18 - -highlight Win cterm=none ctermfg=188 ctermbg=0 -highlight Directory cterm=bold ctermfg=4 ctermbg=0 -highlight CurrLine cterm=none ctermfg=3 ctermbg=19 -highlight OtherLine cterm=none ctermfg=3 ctermbg=19 -highlight Selected cterm=none ctermfg=5 ctermbg=19 - -highlight JobLine cterm=bold ctermfg=0 ctermbg=18 -highlight StatusLine cterm=bold ctermfg=0 ctermbg=18 -highlight ErrorMsg cterm=bold ctermfg=0 ctermbg=18 -highlight WildMenu cterm=bold ctermfg=0 ctermbg=18 -highlight CmdLine cterm=none ctermfg=20 ctermbg=0 - -highlight Executable cterm=bold ctermfg=2 ctermbg=0 -highlight Link cterm=none ctermfg=9 ctermbg=0 -highlight BrokenLink cterm=none ctermfg=1 ctermbg=0 -highlight Device cterm=none ctermfg=228 ctermbg=0 -highlight Fifo cterm=none ctermfg=109 ctermbg=0 -highlight Socket cterm=none ctermfg=110 ctermbg=0 diff --git a/profiles/base-user/.config/vifm/vifmrc b/profiles/base-user/.config/vifm/vifmrc deleted file mode 100644 index ea4862aa..00000000 --- a/profiles/base-user/.config/vifm/vifmrc +++ /dev/null @@ -1,495 +0,0 @@ -" vim: filetype=vifm : -" Sample configuration file for vifm (last updated: 2 June, 2019) -" You can edit this file by hand. -" The " character at the beginning of a line comments out the line. -" Blank lines are ignored. -" The basic format for each item is shown with an example. - -" ------------------------------------------------------------------------------ - -" Command used to edit files in various contexts. The default is vim. -" If you would like to use another vi clone such as Elvis or Vile -" you will need to change this setting. - -set vicmd=nvim -" set vicmd=elvis\ -G\ termcap -" set vicmd=vile - -" This makes vifm perform file operations on its own instead of relying on -" standard utilities like `cp`. While using `cp` and alike is a more universal -" solution, it's also much slower when processing large amounts of files and -" doesn't support progress measuring. - -set syscalls - -" Trash Directory -" The default is to move files that are deleted with dd or :d to -" the trash directory. If you change this you will not be able to move -" files by deleting them and then using p to put the file in the new location. -" I recommend not changing this until you are familiar with vifm. -" This probably shouldn't be an option. - -set trash - -" This is how many directories to store in the directory history. - -set history=100 - -" Automatically resolve symbolic links on l or Enter. - -set nofollowlinks - -" With this option turned on you can run partially entered commands with -" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te). - -" set fastrun - -" Natural sort of (version) numbers within text. - -set sortnumbers - -" Maximum number of changes that can be undone. - -set undolevels=100 - -" Use Vim's format of help file (has highlighting and "hyperlinks"). -" If you would rather use a plain text help file set novimhelp. - -set vimhelp - -" If you would like to run an executable file when you -" press return on the file name set this. - -set norunexec - -" Selected color scheme - -colorscheme base16 - -" Format for displaying time in file list. For example: -" TIME_STAMP_FORMAT=%m/%d-%H:%M -" See man date or man strftime for details. - -set timefmt=%m/%d\ %H:%M - -" Show list of matches on tab completion in command-line mode - -set wildmenu - -" Display completions in a form of popup with descriptions of the matches - -set wildstyle=popup - -" Display suggestions in normal, visual and view modes for keys, marks and -" registers (at most 5 files). In other view, when available. - -set suggestoptions=normal,visual,view,otherpane,keys,marks,registers - -" Ignore case in search patterns unless it contains at least one uppercase -" letter - -set ignorecase -set smartcase - -" Don't highlight search results automatically - -set nohlsearch - -" Use increment searching (search while typing) -set incsearch - -" Try to leave some space from cursor to upper/lower border in lists - -set scrolloff=4 - -" Don't do too many requests to slow file systems - -if !has('win') - set slowfs=curlftpfs -endif - -" Set custom status line look - -set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d " - -" ------------------------------------------------------------------------------ - -" :mark mark /full/directory/path [filename] - -mark b ~/bin/ -mark h ~/ - -" ------------------------------------------------------------------------------ - -" :com[mand][!] command_name action -" The following macros can be used in a command -" %a is replaced with the user arguments. -" %c the current file under the cursor. -" %C the current file under the cursor in the other directory. -" %f the current selected file, or files. -" %F the current selected file, or files in the other directory. -" %b same as %f %F. -" %d the current directory name. -" %D the other window directory name. -" %m run the command in a menu window - -command! df df -h %m 2> /dev/null -command! diff vim -d %f %F -command! zip zip -r %f.zip %f -command! unzip unzip %c %c.extracted -command! run !! ./%f -command! make !!make %a -command! mkcd :mkdir %a | cd %a -command! vgrep vim "+grep %a" -command! reload :write | restart - -" ------------------------------------------------------------------------------ - -" The file type is for the default programs to be used with -" a file extension. -" :filetype pattern1,pattern2 defaultprogram,program2 -" :fileviewer pattern1,pattern2 consoleviewer -" The other programs for the file type can be accessed with the :file command -" The command macros %f, %F, %d, %F may be used in the commands. -" The %a macro is ignored. To use a % you must put %%. - -" For automated FUSE mounts, you must register an extension with :file[x]type -" in one of following formats: -" -" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables -" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime. -" A sample line might look like this: -" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR -" -" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables -" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime. -" A sample line might look like this: -" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR -" %PARAM value is filled from the first line of file (whole line). -" Example first line for SshMount filetype: root@127.0.0.1:/ -" -" You can also add %CLEAR if you want to clear screen before running FUSE -" program. - -" Pdf -filextype *.pdf epdfview %c %i &, apvlv %c, xpdf %c -fileviewer *.pdf - \ vifmimg pdfpreview %px %py %pw %ph %c - \ %pc - \ vifmimg clear - " \ pdftotext -nopgbrk %c - - -" PostScript -filextype *.ps,*.eps,*.ps.gz - \ {View in zathura} - \ zathura %f, - \ {View in gv} - \ gv %c %i &, - -" Djvu -filextype *.djvu - \ {View in zathura} - \ zathura %f, - \ {View in apvlv} - \ apvlv %f, - -" Audio -filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus - \ {Play using vlc} - \ vlc %c, - \ {Play using ffplay} - \ ffplay -nodisp -autoexit %c, -fileviewer *.mp3 mp3info -fileviewer *.flac soxi - -" Video -filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, - \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, - \*.as[fx] - \ {View using vlc} - \ vlc %f, - \ {View using ffplay} - \ ffplay -fs -autoexit %f, -fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, - \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, - \*.as[fx] - \ vifmimg videopreview %px %py %pw %ph %c - \ %pc - \ vifmimg clear - " \ ffprobe -pretty %c 2>&1 - -" Web -filextype *.html,*.htm - \ {Open with vim} - \ nvim %f, - \ {Open with firefox} - \ firefox %f &, -filetype *.html,*.htm links, lynx - -" Object -filetype *.o nm %f | less - -" Man page -filetype *.[1-8] man ./%c -fileviewer *.[1-8] man ./%c | col -b - -" Images -filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm - \ {View in viewnior} - \ viewnior %f, -fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm - \ vifmimg draw %px %py %pw %ph %c - \ %pc - \ vifmimg clear - " Get w3m image previews inside vifm - " \ imgt %px %py %pw %ph %c - " \ %pc - " \ imgc %px %py %pw %ph NOT NEEDED IN XTERM -fileviewer *.gif - \ vifmimg gifpreview %px %py %pw %ph %c - \ %pc - \ vifmimg clear - -" OpenRaster -filextype *.ora - \ {Edit in MyPaint} - \ mypaint %f, - -" Mindmap -filextype *.vym - \ {Open with VYM} - \ vym %f &, - -" MD5 -filetype *.md5 - \ {Check MD5 hash sum} - \ md5sum -c %f %S, - -" SHA1 -filetype *.sha1 - \ {Check SHA1 hash sum} - \ sha1sum -c %f %S, - -" SHA256 -filetype *.sha256 - \ {Check SHA256 hash sum} - \ sha256sum -c %f %S, - -" SHA512 -filetype *.sha512 - \ {Check SHA512 hash sum} - \ sha512sum -c %f %S, - -" GPG signature -filetype *.asc - \ {Check signature} - \ !!gpg --verify %c, - -" Torrent -filetype *.torrent ktorrent %f & -fileviewer *.torrent dumptorrent -v %c - -" FuseZipMount -filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg - \ {Mount with fuse-zip} - \ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR, - \ {View contents} - \ zip -sf %c | less, - \ {Extract here} - \ tar -xf %c, -fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c - -" ArchiveMount -filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz - \ {Mount with archivemount} - \ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.tgz,*.tar.gz tar -tzf %c -fileviewer *.tar.bz2,*.tbz2 tar -tjf %c -fileviewer *.tar.txz,*.txz xz --list %c -fileviewer *.tar tar -tf %c - -" Rar2FsMount and rar archives -filetype *.rar - \ {Mount with rar2fs} - \ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.rar unrar v %c - -" IsoMount -filetype *.iso - \ {Mount with fuseiso} - \ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR, - -" SshMount -filetype *.ssh - \ {Mount with sshfs} - \ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND, - -" FtpMount -filetype *.ftp - \ {Mount with curlftpfs} - \ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND, - -" Fuse7z and 7z archives -filetype *.7z - \ {Mount with fuse-7z} - \ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.7z 7z l %c - -" Office files -filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f & -fileviewer *.doc catdoc %c -fileviewer *.docx docx2txt.pl %f - - -" TuDu files -filetype *.tudu tudu -f %c - -" Qt projects -filextype *.pro qtcreator %f & - -" All others -filetype *.ts,*.js,*.css,*.sass,*.scss,*.go,*.rs,*.py,*.html,*.xhtml,*.json,*.jsx,*.tsx,*.vue,*.svelte,*.sql - \ {Open in editor} - \ nvim %c, -fileviewer *.ts,*.js,*.css,*.sass,*.scss,*.go,*.rs,*.py,*.html,*.xhtml,*.json,*.jsx,*.tsx,*.vue,*.svelte,*.sql bat %c - -" Directories -filextype */ - \ {View in thunar} - \ Thunar %f &, - -" Syntax highlighting in preview -" -" Explicitly set highlight type for some extensions -" -" 256-color terminal -" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c -" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c -" -" 16-color terminal -" fileviewer *.c,*.h highlight -O ansi -s dante %c -" -" Or leave it for automatic detection -" -" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g - -" Displaying pictures in terminal -" -" fileviewer *.jpg,*.png shellpic %c - -" Open all other files with default system programs (you can also remove all -" :file[x]type commands above to ensure they don't interfere with system-wide -" settings). By default all unknown files are opened with 'vi[x]cmd' -" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option -" for unknown file types. -" For *nix: -" filetype * xdg-open -" For OS X: -" filetype * open -" For Windows: -" filetype * start, explorer - -" ------------------------------------------------------------------------------ - -" What should be saved automatically between vifm sessions. Drop "savedirs" -" value if you don't want vifm to remember last visited directories for you. -set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, - \phistory,fhistory,dirstack,registers,bookmarks,bmarks - -" ------------------------------------------------------------------------------ - -" Examples of configuring both panels - -" Customize view columns a bit (enable ellipsis for truncated file names) -" -" set viewcolumns=-{name}..,6{}. - -" Filter-out build and temporary files -" -" filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/ - -" ------------------------------------------------------------------------------ - -" Sample mappings - -" Start shell in current directory -nnoremap s :shell - -" Display sorting dialog -nnoremap S :sort - -" Toggle visibility of preview window -nnoremap w :view -vnoremap w :viewgv - -" Open file in existing instance of nvim -nnoremap o :!vim %f -" Open file in new instance of vim -nnoremap O :!vim %f - -" Open file in the background using its default program -nnoremap gb :file &l - -" Interaction with system clipboard -if has('win') - " Yank current directory path to Windows clipboard with forward slashes - nnoremap yp :!echo %"d:gs!\!/! %i | clip - " Yank path to current file to Windows clipboard with forward slashes - nnoremap yf :!echo %"c:gs!\!/! %i | clip -elseif executable('xclip') - " Yank current directory path into the clipboard - nnoremap yd :!echo %d | xclip %i - " Yank current file path into the clipboard - nnoremap yf :!echo %c:p | xclip %i -elseif executable('xsel') - " Yank current directory path into primary and selection clipboards - nnoremap yd :!echo -n %d | xsel --input --primary %i && - \ echo -n %d | xsel --clipboard --input %i - " Yank current file path into into primary and selection clipboards - nnoremap yf :!echo -n %c:p | xsel --input --primary %i && - \ echo -n %c:p | xsel --clipboard --input %i -endif - -" Mappings for faster renaming -nnoremap I cw -nnoremap cc cw -nnoremap A cw - -" Open console in current directory -nnoremap ,t :!xterm & - -" Open editor to edit vifmrc and apply settings after returning to vifm -nnoremap ,c :write | edit $MYVIFMRC | restart -" Open gvim to edit vifmrc -nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC & - -" Toggle wrap setting on ,w key -nnoremap ,w :set wrap! - -" Example of standard two-panel file managers mappings -nnoremap :!less %f -nnoremap :edit -nnoremap :copy -nnoremap :move -nnoremap :mkdir -nnoremap :delete - -" Arrow remapping -map i -map j -map k -noremap h i - -vnoremap K L -vnoremap I H -vnoremap H I - -nnoremap K L -nnoremap I H -nnoremap H I - -" Escape overwrite -cmap jj - -" fzf -command! FZFfind :set noquickview | :execute 'goto "'.system('fd --hidden --exclude .git --exclude node_modules | fzf --preview "ls -lhA --group-directories-first --color=always {}" --preview-window wrap 2>/dev/tty ').'"%IU' | redraw -nnoremap :FZFfind diff --git a/profiles/base-user/home.nix b/profiles/base-user/home.nix index 52ee6fd5..5b5b5877 100644 --- a/profiles/base-user/home.nix +++ b/profiles/base-user/home.nix @@ -61,8 +61,6 @@ in { xdg.configFile."user-dirs.locale".source = ./.config/user-dirs.locale; xdg.configFile."xsettingsd/xsettingsd.conf".source = ./.config/xsettingsd/xsettingsd.conf; xdg.configFile."mako/config".source = ./.config/mako/config; - xdg.configFile."vifm/vifmrc".source = ./.config/vifm/vifmrc; - xdg.configFile."vifm/colors/base16.vifm".source = ./.config/vifm/colors/base16.vifm; xdg.configFile."libinput-gestures.conf".source = ./.config/libinput-gestures.conf; xdg.configFile."waybar/config".source = ./.config/waybar/config; xdg.configFile."waybar/style.css".source = ./.config/waybar/style.css; diff --git a/profiles/base-user/session-variables.nix b/profiles/base-user/session-variables.nix index d21a9f80..9219c7da 100644 --- a/profiles/base-user/session-variables.nix +++ b/profiles/base-user/session-variables.nix @@ -86,6 +86,23 @@ # FZF shell history widget default colors FZF_DEFAULT_OPTS = lib.mkForce "--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7 --color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062 --color=marker:#ef9062,fg+:#d3d1d4,prompt:#e5c463,hl+:#7accd7"; + + # nnn theme colors + NNN_FCOLORS = let + BLK = "04"; + CHR = "04"; + DIR = "04"; + EXE = "02"; + REG = "00"; + HARDLINK = "01"; + SYMLINK = "01"; + MISSING = "01"; + ORPHAN = "07"; + FIFO = "05"; + SOCK = "05"; + OTHER = "02"; + in + BLK + CHR + DIR + EXE + REG + HARDLINK + SYMLINK + MISSING + ORPHAN + FIFO + SOCK + OTHER; }; envListNames = lib.attrsets.mapAttrsToList (name: value: name) variables; From e36709613c2399429e154279adea71c508dc72d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 13 Jul 2023 18:07:58 +0200 Subject: [PATCH 02/14] fix: load schemastore for nvim --- modules/terminal-life/nvim/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index b2f21bc1..9625c009 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -111,12 +111,23 @@ in { # File browser. Use n to access nnn-vim + # Highlight characters when using f, F, t, and T quick-scope + + # get sudo in vim; :SudaWrite suda-vim +<<<<<<< Updated upstream vim-gutentags vim-vinegar +======= + + # undo history etc. per project +>>>>>>> Stashed changes vim-workspace-nvfetcher + # JSON schemas + SchemaStore-nvim + sonokai vim-hybrid-material vim-airline-themes From fd74f59c39e582be0d8a07ad23e013a73a8d95b3 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 14 Jul 2023 13:12:50 +0200 Subject: [PATCH 03/14] Bump flake inputs nixos + latest in lockfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated input 'latest': 'github:nixos/nixpkgs/645ff62e09d294a30de823cb568e9c6d68e92606' (2023-07-01) → 'github:nixos/nixpkgs/2de8efefb6ce7f5e4e75bdf57376a96555986841' (2023-07-12) • Updated input 'nixos': 'github:nixos/nixpkgs/b72aa95f7f096382bff3aea5f8fde645bca07422' (2023-06-30) → 'github:nixos/nixpkgs/fcc147b1e9358a8386b2c4368bd928e1f63a7df2' (2023-07-13) --- flake.lock | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index b50347fc..b591103b 100644 --- a/flake.lock +++ b/flake.lock @@ -236,34 +236,13 @@ "type": "github" } }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1682203081, - "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "latest": { "locked": { - "lastModified": 1688231357, - "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", + "lastModified": 1689192006, + "narHash": "sha256-QM0f0d8oPphOTYJebsHioR9+FzJcy1QNIzREyubB91U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", + "rev": "2de8efefb6ce7f5e4e75bdf57376a96555986841", "type": "github" }, "original": { @@ -275,11 +254,11 @@ }, "nixos": { "locked": { - "lastModified": 1688109178, - "narHash": "sha256-BSdeYp331G4b1yc7GIRgAnfUyaktW2nl7k0C577Tttk=", + "lastModified": 1689209875, + "narHash": "sha256-8AVcBV1DiszaZzHFd5iLc8HSLfxRAuqcU0QdfBEF3Ag=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b72aa95f7f096382bff3aea5f8fde645bca07422", + "rev": "fcc147b1e9358a8386b2c4368bd928e1f63a7df2", "type": "github" }, "original": { From 9271e8d03776e8ef22341274cfc731a36fac3d55 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 14 Jul 2023 13:13:13 +0200 Subject: [PATCH 04/14] Fix merge conflict leftovers --- modules/terminal-life/nvim/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 9625c009..99e555f3 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -114,15 +114,10 @@ in { # Highlight characters when using f, F, t, and T quick-scope - # get sudo in vim; :SudaWrite + # Get sudo in vim; :SudaWrite suda-vim -<<<<<<< Updated upstream - vim-gutentags - vim-vinegar -======= - # undo history etc. per project ->>>>>>> Stashed changes + # Undo history etc. per project vim-workspace-nvfetcher # JSON schemas From 1fe6d34f6ec9f773cb048f1efb6cb70bc58a17e5 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 14 Jul 2023 13:38:01 +0200 Subject: [PATCH 05/14] neovim: add syntax highlighting for ini, lua, bash, make, ninja, diff, php Sort nvim-treesitter.withPlugins alphabetically --- modules/terminal-life/nvim/default.nix | 51 +++++++++++++++++++------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 99e555f3..e7239883 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -48,55 +48,66 @@ in { [] ++ lib.optionals (!cfg.lite) [ (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [ - p.nix - p.markdown + p.ini p.json p.json5 + p.markdown + p.nix + p.toml p.yaml - p.html p.css - p.scss - p.typescript - p.tsx - p.javascript p.graphql + p.html + p.javascript + p.scss + p.tsx + p.typescript p.vue - p.rust + p.c + p.cpp p.go p.gomod p.gosum - p.ruby - p.python p.haskell - p.c - p.cpp + p.lua + p.php + p.python + p.ruby + p.rust p.vim p.vimdoc - p.sql p.passwd + p.sql + p.diff p.gitcommit p.gitignore p.git_config p.gitattributes p.git_rebase + p.bash p.dockerfile + p.make + p.ninja p.terraform ])) + # Dependencies for nvim-lspconfig nvim-cmp cmp-nvim-lsp cmp_luasnip luasnip + # Quickstart configs for neovim LSP lsp_extensions-nvim nvim-lspconfig + # Collaborative editing in Neovim using built-in capabilities instant-nvim-nvfetcher # Search functionality behind :Ack @@ -123,27 +134,39 @@ in { # JSON schemas SchemaStore-nvim + # Neovim colorschemes / themes sonokai vim-hybrid-material vim-airline-themes vim-apprentice-nvfetcher + # Git integrations + # A Git wrapper so awesome, it should be illegal fugitive + # Shows git diff markers in the sign column vim-gitgutter + # GitHub extension for fugitive vim-rhubarb + # Ease your git workflow within Vim vimagit-nvfetcher + # FZF fuzzy finder fzf-vim fzfWrapper + # Make the yanked region apparent vim-highlightedyank + # :Beautify Code beautifier vim-beautify-nvfetcher - vim-surround + # Unload, delete or wipe a buffer without closing the window vim-bufkill + # Defaults everyone can agree on vim-sensible + # emmet for vim: http://emmet.io/ emmet-vim + # Caddyfile syntax support for Vim vim-caddyfile-nvfetcher ]; From d951e821b3ea68765c918e4805a6d418c8f96f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 20 Jul 2023 23:59:08 +0200 Subject: [PATCH 06/14] feat: add back vim-gutentags to nvim --- modules/terminal-life/nvim/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index e7239883..87e2ae09 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -134,6 +134,9 @@ in { # JSON schemas SchemaStore-nvim + # Work with tags files + vim-gutentags + # Neovim colorschemes / themes sonokai vim-hybrid-material From 9bade4eb64f4c40b12749925dc4f80950fb57617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 20 Jul 2023 23:59:36 +0200 Subject: [PATCH 07/14] feat: add line length indicators to gitmessage --- profiles/base-user/.config/git/gitmessage.nix | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/profiles/base-user/.config/git/gitmessage.nix b/profiles/base-user/.config/git/gitmessage.nix index b3caf55a..223bfc3e 100644 --- a/profiles/base-user/.config/git/gitmessage.nix +++ b/profiles/base-user/.config/git/gitmessage.nix @@ -6,27 +6,27 @@ user = config.pub-solar.user; xdg = config.home-manager.users."${user.name}".xdg; in '' - # What happened? - # - # fix feat build chore ci docs style refactor perf test - # - # type!(optional scope): - # +# What happened? +# +# fix feat build chore ci docs style refactor perf test +# +# type!(optional scope): --------------# +# - # ^\n - # What exactly was done and why? - # +# ^\n +# What exactly was done and why? --------------------------------------# +# - # ^\n - # - # Any issue numbers or links? - # - # Refs: #123 +# ^\n +# +# Any issue numbers or links? +# +# Ref: #123 - # ^\n - # - # Co-authored-by: Example Name +# ^\n +# +# Co-authored-by: Example Name '' From 2d27b9c315c153c45288681852c2efd9547570c3 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 21 Jul 2023 12:04:14 +0200 Subject: [PATCH 08/14] nvfetcher: use version 0.6.1.0 from latest instead of flake --- flake.lock | 60 +----------------------------------------- flake.nix | 6 ----- overlays/overrides.nix | 1 + 3 files changed, 2 insertions(+), 65 deletions(-) diff --git a/flake.lock b/flake.lock index b591103b..3926e233 100644 --- a/flake.lock +++ b/flake.lock @@ -197,24 +197,6 @@ "type": "github" } }, - "flake-utils_3": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687171271, - "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "home": { "inputs": { "nixpkgs": [ @@ -299,30 +281,6 @@ "type": "github" } }, - "nvfetcher": { - "inputs": { - "flake-compat": [ - "flake-compat" - ], - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "nixos" - ] - }, - "locked": { - "lastModified": 1687440270, - "narHash": "sha256-aOAXvfVn+MBSkU+xlQEiyoGpRaF6NvQdpWIhw5OH/Dc=", - "owner": "berberman", - "repo": "nvfetcher", - "rev": "44196458acc2c28c32e456c50277d6148e71e708", - "type": "github" - }, - "original": { - "owner": "berberman", - "repo": "nvfetcher", - "type": "github" - } - }, "root": { "inputs": { "agenix": "agenix", @@ -333,23 +291,7 @@ "home": "home", "latest": "latest", "nixos": "nixos", - "nixos-hardware": "nixos-hardware", - "nvfetcher": "nvfetcher" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixos-hardware": "nixos-hardware" } }, "utils": { diff --git a/flake.nix b/flake.nix index d6cf85a8..f6594667 100644 --- a/flake.nix +++ b/flake.nix @@ -34,10 +34,6 @@ agenix.inputs.darwin.follows = "darwin"; nixos-hardware.url = "github:nixos/nixos-hardware"; - - nvfetcher.url = "github:berberman/nvfetcher"; - nvfetcher.inputs.nixpkgs.follows = "nixos"; - nvfetcher.inputs.flake-compat.follows = "flake-compat"; }; outputs = { @@ -48,7 +44,6 @@ nixos-hardware, agenix, deploy, - nvfetcher, ... } @ inputs: digga.lib.mkFlake @@ -86,7 +81,6 @@ }); }) agenix.overlays.default - nvfetcher.overlays.default (import ./pkgs) ]; diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 37a8e0e8..7fa801d5 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -4,6 +4,7 @@ channels: final: prev: { inherit (channels.latest) nixd + nvfetcher ; haskellPackages = From 5a05079e17e2b140bea683f1fe14dbfabc42757c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 21 Jul 2023 11:55:23 +0200 Subject: [PATCH 09/14] graphical: fix network-manager-applet service description --- modules/graphical/network-manager-applet.service.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/graphical/network-manager-applet.service.nix b/modules/graphical/network-manager-applet.service.nix index 4252c065..a3214651 100644 --- a/modules/graphical/network-manager-applet.service.nix +++ b/modules/graphical/network-manager-applet.service.nix @@ -1,6 +1,6 @@ pkgs: { Unit = { - Description = "Lightweight Wayland notification daemon"; + Description = "Network Manager applet"; BindsTo = ["sway-session.target"]; After = ["sway-session.target"]; # ConditionEnvironment requires systemd v247 to work correctly From 88404be55b0cc10774d17f54aa0507467f5522f2 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 21 Jul 2023 11:55:09 +0200 Subject: [PATCH 10/14] Bump nvfetcher --- pkgs/_sources/generated.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/_sources/generated.nix b/pkgs/_sources/generated.nix index 4a9c9654..eaf5b466 100644 --- a/pkgs/_sources/generated.nix +++ b/pkgs/_sources/generated.nix @@ -3,17 +3,17 @@ { blesh-nvfetcher = { pname = "blesh-nvfetcher"; - version = "1afc616b890e487926897e5b3e3a33e0ad833cb3"; + version = "4089c4e1cb411121472180189953664b978d8972"; src = fetchFromGitHub { owner = "akinomyoga"; repo = "ble.sh"; - rev = "1afc616b890e487926897e5b3e3a33e0ad833cb3"; + rev = "4089c4e1cb411121472180189953664b978d8972"; fetchSubmodules = true; deepClone = false; leaveDotGit = true; - sha256 = "sha256-gDxx7nDleS2HWIJWc208gcTzuRUEu/JCyepTuOJDAGo="; + sha256 = "sha256-ZLkiBm3vsRe42crLffM9Z8F5yzKvNRV2/AqK9RkuU+8="; }; - date = "2023-06-29"; + date = "2023-07-18"; }; instant-nvim-nvfetcher = { pname = "instant-nvim-nvfetcher"; From 5acbaa3dd5e28124c719692786748e7115d2da37 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 21 Jul 2023 12:12:11 +0200 Subject: [PATCH 11/14] flake: update nixos + latest inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated input 'latest': 'github:nixos/nixpkgs/2de8efefb6ce7f5e4e75bdf57376a96555986841' (2023-07-12) → 'github:nixos/nixpkgs/5df4d78d54f7a34e9ea1f84a22b4fd9baebc68d0' (2023-07-20) • Updated input 'nixos': 'github:nixos/nixpkgs/fcc147b1e9358a8386b2c4368bd928e1f63a7df2' (2023-07-13) → 'github:nixos/nixpkgs/08700de174bc6235043cb4263b643b721d936bdb' (2023-07-18) --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 3926e233..b33b1197 100644 --- a/flake.lock +++ b/flake.lock @@ -220,11 +220,11 @@ }, "latest": { "locked": { - "lastModified": 1689192006, - "narHash": "sha256-QM0f0d8oPphOTYJebsHioR9+FzJcy1QNIzREyubB91U=", + "lastModified": 1689850295, + "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2de8efefb6ce7f5e4e75bdf57376a96555986841", + "rev": "5df4d78d54f7a34e9ea1f84a22b4fd9baebc68d0", "type": "github" }, "original": { @@ -236,11 +236,11 @@ }, "nixos": { "locked": { - "lastModified": 1689209875, - "narHash": "sha256-8AVcBV1DiszaZzHFd5iLc8HSLfxRAuqcU0QdfBEF3Ag=", + "lastModified": 1689680872, + "narHash": "sha256-brNix2+ihJSzCiKwLafbyejrHJZUP0Fy6z5+xMOC27M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fcc147b1e9358a8386b2c4368bd928e1f63a7df2", + "rev": "08700de174bc6235043cb4263b643b721d936bdb", "type": "github" }, "original": { From 110e0aefada222629a6c84b8637fdcceb010c9f8 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 13 Sep 2023 12:12:25 +0200 Subject: [PATCH 12/14] Bump flake inputs in lock file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated input 'latest': 'github:nixos/nixpkgs/5df4d78d54f7a34e9ea1f84a22b4fd9baebc68d0' (2023-07-20) → 'github:nixos/nixpkgs/3a2786eea085f040a66ecde1bc3ddc7099f6dbeb' (2023-09-11) • Updated input 'nixos': 'github:nixos/nixpkgs/08700de174bc6235043cb4263b643b721d936bdb' (2023-07-18) → 'github:nixos/nixpkgs/e5f018cf150e29aac26c61dac0790ea023c46b24' (2023-09-12) • Updated input 'darwin': 'github:LnL7/nix-darwin/b06bab83bdf285ea0ae3c8e145a081eb95959047' (2023-07-02) → 'github:LnL7/nix-darwin/4496ab26628c5f43d2a5c577a06683c753e32fe2' (2023-09-12) • Updated input 'deploy': 'github:serokell/deploy-rs/724463b5a94daa810abfc64a4f87faef4e00f984' (2023-06-14) → 'github:serokell/deploy-rs/31c32fb2959103a796e07bbe47e0a5e287c343a8' (2023-09-12) • Updated input 'home': 'github:nix-community/home-manager/07c347bb50994691d7b0095f45ebd8838cf6bc38' (2023-06-27) → 'github:nix-community/home-manager/9787dffff5d315c9593d3f9fb0f9bf2097e1b57b' (2023-09-11) • Updated input 'nixos-hardware': 'github:nixos/nixos-hardware/429f232fe1dc398c5afea19a51aad6931ee0fb89' (2023-06-15) → 'github:nixos/nixos-hardware/3ccd87fcdae4732fe33773cefa4375c641a057e7' (2023-09-13) --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index b33b1197..12fc00b7 100644 --- a/flake.lock +++ b/flake.lock @@ -30,11 +30,11 @@ ] }, "locked": { - "lastModified": 1688307440, - "narHash": "sha256-7PTjbN+/+b799YN7Tk2SS5Vh8A0L3gBo8hmB7Y0VXug=", + "lastModified": 1694497842, + "narHash": "sha256-z03v/m0OwcLBok97KcUgMl8ZFw5Xwsi2z+n6nL7JdXY=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "b06bab83bdf285ea0ae3c8e145a081eb95959047", + "rev": "4496ab26628c5f43d2a5c577a06683c753e32fe2", "type": "github" }, "original": { @@ -54,11 +54,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1686747123, - "narHash": "sha256-XUQK9kwHpTeilHoad7L4LjMCCyY13Oq383CoFADecRE=", + "lastModified": 1694513707, + "narHash": "sha256-wE5kHco3+FQjc+MwTPwLVqYz4hM7uno2CgXDXUFMCpc=", "owner": "serokell", "repo": "deploy-rs", - "rev": "724463b5a94daa810abfc64a4f87faef4e00f984", + "rev": "31c32fb2959103a796e07bbe47e0a5e287c343a8", "type": "github" }, "original": { @@ -204,11 +204,11 @@ ] }, "locked": { - "lastModified": 1687871164, - "narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=", + "lastModified": 1694465129, + "narHash": "sha256-8BQiuobMrCfCbGM7w6Snx+OBYdtTIm0+cGVaKwQ5BFg=", "owner": "nix-community", "repo": "home-manager", - "rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38", + "rev": "9787dffff5d315c9593d3f9fb0f9bf2097e1b57b", "type": "github" }, "original": { @@ -220,11 +220,11 @@ }, "latest": { "locked": { - "lastModified": 1689850295, - "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", + "lastModified": 1694422566, + "narHash": "sha256-lHJ+A9esOz9vln/3CJG23FV6Wd2OoOFbDeEs4cMGMqc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5df4d78d54f7a34e9ea1f84a22b4fd9baebc68d0", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", "type": "github" }, "original": { @@ -236,11 +236,11 @@ }, "nixos": { "locked": { - "lastModified": 1689680872, - "narHash": "sha256-brNix2+ihJSzCiKwLafbyejrHJZUP0Fy6z5+xMOC27M=", + "lastModified": 1694499547, + "narHash": "sha256-R7xMz1Iia6JthWRHDn36s/E248WB1/je62ovC/dUVKI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "08700de174bc6235043cb4263b643b721d936bdb", + "rev": "e5f018cf150e29aac26c61dac0790ea023c46b24", "type": "github" }, "original": { @@ -252,11 +252,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1686838567, - "narHash": "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=", + "lastModified": 1694591211, + "narHash": "sha256-NPP7XGZH+Q5ey7nE2zGLrBrzKmLYPhj8YgsTSdhH0D4=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "429f232fe1dc398c5afea19a51aad6931ee0fb89", + "rev": "3ccd87fcdae4732fe33773cefa4375c641a057e7", "type": "github" }, "original": { From dfd80c0e95c3046abe54558982c7a8205a30cc26 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 13 Sep 2023 12:38:12 +0200 Subject: [PATCH 13/14] Fix nvfetcher by using forked nixpkgs See upstream issue: https://github.com/NixOS/nixpkgs/issues/249962 --- flake.lock | 17 +++++++++++++++++ flake.nix | 3 +++ overlays/overrides.nix | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/flake.lock b/flake.lock index 12fc00b7..0ed605bd 100644 --- a/flake.lock +++ b/flake.lock @@ -197,6 +197,22 @@ "type": "github" } }, + "fork": { + "locked": { + "lastModified": 1692960587, + "narHash": "sha256-39SKGdhn8jKKkdqhULbCvQOpdUPE9NNJpy5HTB++Jvg=", + "owner": "teutat3s", + "repo": "nixpkgs", + "rev": "312709dd70684f52496580e533d58645526b1c90", + "type": "github" + }, + "original": { + "owner": "teutat3s", + "ref": "nvfetcher-fix", + "repo": "nixpkgs", + "type": "github" + } + }, "home": { "inputs": { "nixpkgs": [ @@ -288,6 +304,7 @@ "deploy": "deploy", "digga": "digga", "flake-compat": "flake-compat", + "fork": "fork", "home": "home", "latest": "latest", "nixos": "nixos", diff --git a/flake.nix b/flake.nix index f6594667..61085b21 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,8 @@ nixos.url = "github:nixos/nixpkgs/nixos-23.05"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; + fork.url = "github:teutat3s/nixpkgs/nvfetcher-fix"; + flake-compat.url = "github:edolstra/flake-compat"; flake-compat.flake = false; @@ -69,6 +71,7 @@ ]; }; latest = {}; + fork = {}; }; lib = import ./lib {lib = digga.lib // nixos.lib;}; diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 7fa801d5..e1070df4 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -4,6 +4,10 @@ channels: final: prev: { inherit (channels.latest) nixd + ; + + inherit + (channels.fork) nvfetcher ; From d83389b1dd7c7fed6436454649d268cc29e9868e Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 13 Sep 2023 12:38:31 +0200 Subject: [PATCH 14/14] Use docker version 24 --- modules/docker/default.nix | 1 + overlays/overrides.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/docker/default.nix b/modules/docker/default.nix index ef733b45..e4558255 100644 --- a/modules/docker/default.nix +++ b/modules/docker/default.nix @@ -14,6 +14,7 @@ in { config = mkIf cfg.enable { virtualisation.docker.enable = true; + virtualisation.docker.package = pkgs.docker_24; users.users = with pkgs; pkgs.lib.setAttrByPath [psCfg.user.name] { extraGroups = ["docker"]; diff --git a/overlays/overrides.nix b/overlays/overrides.nix index e1070df4..40fe2f70 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -4,6 +4,7 @@ channels: final: prev: { inherit (channels.latest) nixd + docker_24 ; inherit