agdsn and networking updates

This commit is contained in:
Rouven Seifert 2023-10-26 12:12:45 +02:00
parent 5148ff5953
commit 45628bdbc3
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
22 changed files with 86 additions and 476 deletions

View file

@ -22,6 +22,11 @@ in
default = {
withExternalGnupg = true;
isDefault = true;
settings = {
"intl.date_time.pattern_override.connector_short" = "{1} {0}";
"intl.date_time.pattern_override.date_short" = "yyyy-MM-dd";
"intl.date_time.pattern_override.time_short" = "HH:mm";
};
};
};
};

View file

@ -11,7 +11,6 @@
./sops
./spotify
./ssh
./vifm
./theme
./packages.nix
];

View file

@ -1,7 +1,7 @@
{ pkgs, ... }:
let
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-full
inherit (pkgs.texlive) scheme-small
dvisvgm dvipng# for preview and export as html
wrapfig amsmath ulem hyperref capt-of;
# (setq org-latex-compiler "lualatex")
@ -48,6 +48,7 @@ in
element-desktop
gomuks # alternative matrix client
mattermost-desktop
gajim
# games
# dwarf-fortress-packages.dwarf-fortress-full
@ -71,7 +72,6 @@ in
bacula
hcloud
jq
logseq
xournalpp
libreoffice
@ -82,6 +82,7 @@ in
clippy
gcc
nodejs_20
gnumake
plantuml

View file

@ -63,7 +63,7 @@ in
};
"router" = matchBlocks."cudy";
"cudy" = {
hostname = "192.168.1.1";
hostname = "192.168.42.1";
user = "root";
};
"git@raspi" = {
@ -74,6 +74,10 @@ in
match = "Host ifsr.de User git";
identityFile = git;
};
"git@git.agdsn.de" = {
match = "Host git.agdsn.de User git";
identityFile = git;
};
};
extraConfig = ''
PKCS11Provider /run/current-system/sw/lib/libtpm2_pkcs11.so

View file

@ -5,7 +5,7 @@
colorScheme = nix-colors.colorSchemes.dracula;
# theme hardcoded to dracula, too lazy to make all this base16
home.sessionVariables.GTK_THEME = "Dracula";
systemd.user.sessionVariables.GTK_THEME = "Dracula";
qt = {
enable = true;
style = {

View file

@ -1,17 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
vifm
ffmpegthumbnailer
dumptorrent
poppler_utils
fontpreview
];
xdg.configFile."vifm/vifmrc".source = ./vifmrc;
xdg.configFile."vifm/colors/dracula.vifm".source = ./dracula.vifm;
xdg.configFile."vifm/scripts/vifm-sixel" = {
executable = true;
source = ./vifm-sixel;
};
}

View file

@ -1,117 +0,0 @@
" VIFM COLORS
" dracula
" based on: https://github.com/istib/dotfiles/blob/master/vifm/vifm-colors
" Default = -1 = None, can be used for transparency or default color
" Black = 0
" Red = 1
" Green = 2
" Yellow = 3
" Blue = 4
" Magenta = 5
" Cyan = 6
" White = 7
" STYLES
" bold
" underline
" reverse or inverse
" standout
" none
highlight clear
highlight Win cterm=none ctermfg=default ctermbg=none
highlight TopLine cterm=none ctermfg=blue ctermbg=none
highlight TopLineSel cterm=none ctermfg=magenta ctermbg=none
highlight StatusLine cterm=none ctermfg=blue ctermbg=none
highlight Border cterm=none ctermfg=blue ctermbg=none
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight CurrLine cterm=bold ctermfg=236 ctermbg=blue
highlight WildMenu cterm=none,reverse ctermfg=blue ctermbg=236
highlight CmdLine cterm=none ctermfg=255 ctermbg=236
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Directory cterm=none ctermfg=blue ctermbg=default
highlight Link cterm=none ctermfg=cyan ctermbg=default
highlight BrokenLink cterm=none ctermfg=red ctermbg=default
highlight Socket cterm=none ctermfg=magenta ctermbg=black
highlight Device cterm=none ctermfg=red ctermbg=default
highlight Fifo cterm=none ctermfg=yellow ctermbg=black
highlight Executable cterm=none ctermfg=green ctermbg=default
" Ranger devicons for ViFM
" https://github.com/cirala/vifm_devicons
"
" Filetypes/directories
set classify=' :dir:/, :exe:, :reg:, :link:,? :?:, ::../::'
" Specific files
set classify+=' ::.Xdefaults,,.Xresources,,.bashprofile,,.bash_profile,,.bashrc,,.dmrc,,.d_store,,.fasd,,.gitconfig,,.gitignore,,.jack-settings,,.mime.types,,.nvidia-settings-rc,,.pam_environment,,.profile,,.recently-used,,.selected_editor,,.xinitpurc,,.zprofile,,.yarnc,,.snclirc,,.tmux.conf,,.urlview,,.config,,.ini,,.user-dirs.dirs,,.mimeapps.list,,.offlineimaprc,,.msmtprc,,.Xauthority,,config::'
set classify+=' ::dropbox::'
set classify+=' ::favicon.*,,README,,readme::'
set classify+=' ::.vim,,.vimrc,,.gvimrc,,.vifm::'
set classify+=' ::gruntfile.coffee,,gruntfile.js,,gruntfile.ls::'
set classify+=' ::gulpfile.coffee,,gulpfile.js,,gulpfile.ls::'
set classify+=' ::ledger::'
set classify+=' ::license,,copyright,,copying,,LICENSE,,COPYRIGHT,,COPYING::'
set classify+=' ::node_modules::'
set classify+=' ::react.jsx::'
" File extensions
set classify+='λ ::*.ml,,*.mli::'
set classify+=' ::*.styl::'
set classify+=' ::*.scss::'
set classify+=' ::*.py,,*.pyc,,*.pyd,,*.pyo::'
set classify+=' ::*.php::'
set classify+=' ::*.markdown,,*.md::'
set classify+=' ::*.json::'
set classify+=' ::*.js::'
set classify+=' ::*.bmp,,*.gif,,*.ico,,*.jpeg,,*.jpg,,*.png,,*.svg,,*.svgz,,*.tga,,*.tiff,,*.xmb,,*.xcf,,*.xpm,,*.xspf,,*.xwd,,*.cr2,,*.dng,,*.3fr,,*.ari,,*.arw,,*.bay,,*.crw,,*.cr3,,*.cap,,*.data,,*.dcs,,*.dcr,,*.drf,,*.eip,,*.erf,,*.fff,,*.gpr,,*.iiq,,*.k25,,*.kdc,,*.mdc,,*.mef,,*.mos,,*.mrw,,*.obm,,*.orf,,*.pef,,*.ptx,,*.pxn,,*.r3d,,*.raf,,*.raw,,*.rwl,,*.rw2,,*.rwz,,*.sr2,,*.srf,,*.srw,,*.tif,,*.x3f,,*.webp,,*.avif,,*.jxl::'
set classify+=' ::*.ejs,,*.htm,,*.html,,*.slim,,*.xml::'
set classify+=' ::*.mustasche::'
set classify+=' ::*.css,,*.less,,*.bat,,*.conf,,*.ini,,*.rc,,*.yml,,*.cfg::'
set classify+=' ::*.rss::'
set classify+=' ::*.coffee::'
set classify+=' ::*.twig::'
set classify+=' ::*.c++,,*.cpp,,*.cxx,,*.h::'
set classify+=' ::*.cc,,*.c::'
set classify+=' ::*.hs,,*.lhs::'
set classify+=' ::*.lua::'
set classify+=' ::*.jl::'
set classify+=' ::*.go::'
set classify+=' ::*.ts::'
set classify+=' ::*.db,,*.dump,,*.sql::'
set classify+=' ::*.sln,,*.suo::'
set classify+=' ::*.exe::'
set classify+=' ::*.diff,,*.sum,,*.md5,,*.sha512::'
set classify+=' ::*.scala::'
set classify+=' ::*.java,,*.jar::'
set classify+=' ::*.xul::'
set classify+=' ::*.clj,,*.cljc::'
set classify+=' ::*.pl,,*.pm,,*.t::'
set classify+=' ::*.cljs,,*.edn::'
set classify+=' ::*.rb::'
set classify+=' ::*.fish,,*.sh,,*.bash::'
set classify+=' ::*.dart::'
set classify+=' ::*.f#,,*.fs,,*.fsi,,*.fsscript,,*.fsx::'
set classify+=' ::*.rlib,,*.rs::'
set classify+=' ::*.d::'
set classify+=' ::*.erl,,*.hrl::'
set classify+=' ::*.ai::'
set classify+=' ::*.psb,,*.psd::'
set classify+=' ::*.jsx::'
set classify+=' ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::'
set classify+=' ::*.avi,,*.flv,,*.mkv,,*.mov,,*.mp4,,*.mpeg,,*.mpg,,*.webm,,*.av1::'
set classify+=' ::*.epub,,*.pdf,,*.fb2,,*.djvu::'
set classify+=' ::*.7z,,*.apk,,*.bz2,,*.cab,,*.cpio,,*.deb,,*.gem,,*.gz,,*.gzip,,*.lh,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.tar,,*.tgz,,*.xz,,*.zip,,*.zst::'
set classify+=' ::*.cbr,,*.cbz::'
set classify+=' ::*.log::'
set classify+=' ::*.nix::'
set classify+=' ::*.doc,,*.docx,,*.adoc::'
set classify+=' ::*.xls,,*.xlsmx::'
set classify+=' ::*.pptx,,*.ppt::'

View file

@ -1,55 +0,0 @@
#!/run/current-system/sw/bin/bash
[ -d "$HOME/.cache/vifm" ] || mkdir -p "$HOME/.cache/vifm"
# $1 action
action="$1"
# $2 panel width
# $3 panel height
panel_width=$2
panel_height=$3
cell_width=10
cell_height=18
width=$((panel_width*cell_width))
height=$((panel_height*cell_height))
# $4 image path
image_file="$4"
background=black
PCACHE="$HOME/.cache/vifm/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$PWD/$image_file")" | sha256sum | awk '{print $1}')"
cleanup() {
printf '\33[s\33[5A\33[2K\33[u'
clear
exit 0
}
case "$action" in
"clear")
cleanup
;;
"draw")
img2sixel -S --width=$width $image_file
;;
"video")
[ ! -f "${PCACHE}.jpg" ] && \
ffmpegthumbnailer -i "$4" -o "${PCACHE}.jpg" -s 0 -q 5
img2sixel --width=$width ${PCACHE}.jpg
;;
"epub")
[ ! -f "${PCACHE}.jpg" ] && \
epub-thumbnailer "$image_file" "$PCACHE" 1024
img2sixel --width=$width --height=$height ${PCACHE}.jpg
;;
"pdf")
[ ! -f "${PCACHE}.jpg" ] && \
pdftoppm -jpeg -f 1 -singlefile "$image_file" "$PCACHE"
img2sixel --height=$height ${PCACHE}.jpg
;;
"font")
[ ! -f "${PCACHE}.jpg" ] && \
fontpreview -i "$image_file" -o "${PCACHE}.jpg"
img2sixel --width=$width --height=$height ${PCACHE}.jpg
;;
*)
esac

View file

@ -1,251 +0,0 @@
" vim: filetype=vifm :
set vicmd=hx
set syscalls
" Trash Directory
set trash
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<tab>).
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").
set vimhelp
" If you would like to run an executable file when you
" press return on the file name set this.
set norunexec
colorscheme dracula
set timefmt=%m/%d\ %H:%M
set wildmenu
set wildstyle=popup
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
set ignorecase
set smartcase
" Don't highlight search results automatically
set hlsearch
" 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 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! run !! ./%f
command! make !!make %a
command! mkcd :mkdir %a | cd %a
command! vgrep vim "+grep %a"
command! reload :write | restart
" Man page
filetype *.[1-8] man ./%c
fileviewer *.[1-8] man ./%c | col -b
" 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 transmission-gtk %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 -
" Displaying pictures in terminal
fileviewer *.pdf
\ vifm-sixel pdf %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
fileviewer *.epub
\ vifm-sixel epub %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
fileviewer <video/*>
\ vifm-sixel video %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
fileviewer <image/*>
\ vifm-sixel draw %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
fileviewer <audio/*>
\ ffmpeg -i %c -hide_banner -f null /dev/null
fileviewer <font/*>
\ vifm-sixel font %pw %ph %c %pd
\ %pc
\ vifm-sixel clear
filetype * xdg-open
" Start shell in current directory
nnoremap S :shell<cr>
" Display sorting dialog
nnoremap s :sort<cr>
" Toggle visibility of preview window
nnoremap w :view<cr>
vnoremap w :view<cr>gv
" Open file in the background using its default program
nnoremap gb :file &<cr>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<cr>
" Yank path to current file to Windows clipboard with forward slashes
nnoremap yf :!echo %"c:gs!\!/! %i | clip<cr>
elseif executable('xclip')
" Yank current directory path into the clipboard
nnoremap yd :!echo %d | xclip %i<cr>
" Yank current file path into the clipboard
nnoremap yf :!echo %c:p | xclip %i<cr>
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<cr>
" 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<cr>
endif
" Mappings for faster renaming
nnoremap I cw<c-a>
nnoremap cc cw<c-u>
nnoremap A cw
" Toggle wrap setting on ,w key
nnoremap ,w :set wrap!<cr>
" Example of standard two-panel file managers mappings
nnoremap <f5> :copy<cr>
nnoremap <f6> :move<cr>
nnoremap <f8> :delete<cr>