a lot more changes to get it to work on hpm
This commit is contained in:
109
programs/alacritty.nix
Normal file
109
programs/alacritty.nix
Normal file
@@ -0,0 +1,109 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font = {
|
||||
normal = {
|
||||
family = "Hack";
|
||||
style = "Regular";
|
||||
};
|
||||
|
||||
bold = {
|
||||
family = "Hack";
|
||||
style = "Bold";
|
||||
};
|
||||
|
||||
italic = {
|
||||
family = "Hack";
|
||||
style = "Italic";
|
||||
};
|
||||
|
||||
bold_italic = {
|
||||
family = "Hack";
|
||||
style = "Bold Italic";
|
||||
};
|
||||
|
||||
size = 10;
|
||||
};
|
||||
|
||||
# Dracula theme for alacritty
|
||||
colors = {
|
||||
primary = {
|
||||
background = "#282a36";
|
||||
foreground = "#f8f8f2";
|
||||
bright_foreground = "#ffffff";
|
||||
};
|
||||
cursor = {
|
||||
text = "CellBackground";
|
||||
cursor = "CellForeground";
|
||||
};
|
||||
vi_mode_cursor = {
|
||||
text = "CellBackground";
|
||||
cursor = "CellForeground";
|
||||
};
|
||||
search = {
|
||||
matches = {
|
||||
foreground = "#44475a";
|
||||
background = "#50fa7b";
|
||||
};
|
||||
focused_match = {
|
||||
foreground = "#44475a";
|
||||
background = "#ffb86c";
|
||||
};
|
||||
};
|
||||
footer_bar = {
|
||||
background = "#282a36";
|
||||
foreground = "#f8f8f2";
|
||||
};
|
||||
hints = {
|
||||
start = {
|
||||
foreground = "#282a36";
|
||||
background = "#f1fa8c";
|
||||
};
|
||||
end = {
|
||||
foreground = "#f1fa8c";
|
||||
background = "#282a36";
|
||||
};
|
||||
};
|
||||
line_indicator = {
|
||||
foreground = "None";
|
||||
background = "None";
|
||||
};
|
||||
selection = {
|
||||
text = "CellForeground";
|
||||
background = "#44475a";
|
||||
};
|
||||
normal = {
|
||||
black = "#21222c";
|
||||
red = "#ff5555";
|
||||
green = "#50fa7b";
|
||||
yellow = "#f1fa8c";
|
||||
blue = "#bd93f9";
|
||||
magenta = "#ff79c6";
|
||||
cyan = "#8be9fd";
|
||||
white = "#f8f8f2";
|
||||
};
|
||||
bright = {
|
||||
black = "#6272a4";
|
||||
red = "#ff6e6e";
|
||||
green = "#69ff94";
|
||||
yellow = "#ffffa5";
|
||||
blue = "#d6acff";
|
||||
magenta = "#ff92df";
|
||||
cyan = "#a4ffff";
|
||||
white = "#ffffff";
|
||||
};
|
||||
};
|
||||
|
||||
key_bindings = [
|
||||
{ key = "V"; mods = "Control|Shift"; action = "Paste"; }
|
||||
{ key = "C"; mods = "Control|Shift"; action = "Copy"; }
|
||||
{ key = "J"; mods = "Control"; chars = ''\x1b\x5b\x42''; }
|
||||
{ key = "K"; mods = "Control"; chars = ''\x1b\x5b\x41''; }
|
||||
{ key = "H"; mods = "Control"; chars = ''\x1b\x5b\x44''; }
|
||||
{ key = "L"; mods = "Control"; chars = ''\x1b\x5b\x43''; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
284
programs/bash.nix
Normal file
284
programs/bash.nix
Normal file
@@ -0,0 +1,284 @@
|
||||
{ persistentDir, confDir, ... }:
|
||||
{
|
||||
programs.bash = {
|
||||
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
historyFile = "${persistentDir}/bash-history";
|
||||
historyFileSize = 100000;
|
||||
historyControl = [ "ignoredups" ];
|
||||
historyIgnore = [
|
||||
"ls"
|
||||
"cd"
|
||||
"exit"
|
||||
];
|
||||
|
||||
shellOptions = [
|
||||
# append to the history file, don't overwrite it
|
||||
"histappend"
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
"checkwinsize"
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
"globstar"
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
# this does not work aparently....
|
||||
|
||||
# is needed to that ssh works
|
||||
# TERM = "xterm";
|
||||
|
||||
# my prompt
|
||||
PS1 = ''\[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] ❯❯❯ '';
|
||||
|
||||
TEST = "hiiiiiiiiiiiiiiiiiiiiiiiiiii";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
shutdown = "echo try harder.... xD";
|
||||
npw = "nmcli c up pw";
|
||||
#nixre = "sd nixos-rebuild switch --flake ~/work/config/ --impure";
|
||||
flex = "neofetch | lolcat";
|
||||
kwoche = "curl https://kalenderwoche.celll.net/?api=1; echo";
|
||||
psg = "ps -e | grep";
|
||||
vilias = "nvim -c 'set syntax=bash' ${confDir}/common/programs/bash.nix";
|
||||
stl = "sudo systemctl";
|
||||
vim = "nvim";
|
||||
sl = "ls";
|
||||
virsh = "virsh -c qemu:///system";
|
||||
nmgui = ''
|
||||
nm-applet 2>&1 > /dev/null &
|
||||
stalonetray 2>&1 > /dev/null
|
||||
killall nm-applet
|
||||
'';
|
||||
c = "cd ..";
|
||||
ne= "alacritty &";
|
||||
cbs = "history | tail -n 2 | head -n 1 | awk '{\$1=\"\"; print \$0}' | cut -c 2- | cb";
|
||||
gs = "git status";
|
||||
gitlog = "git log --all --graph";
|
||||
ipa= ''
|
||||
echo -e "IPv4:\n-----------------"
|
||||
ip -o a show | cut -d " " -f 2,7 | grep -v : | column -t
|
||||
echo -e "\nIPv6:\n-----------------"
|
||||
ip -o a show | cut -d " " -f 2,7 | grep : | column -t
|
||||
'';
|
||||
};
|
||||
|
||||
bashrcExtra = ''
|
||||
export TERM="xterm-color"
|
||||
|
||||
# my prompt
|
||||
export PS1="\[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] ❯❯❯ "
|
||||
|
||||
|
||||
# so that programms i spawn from my shell don't have so high cpu priority
|
||||
renice -n 9 $$ > /dev/null
|
||||
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# making reverse search "going back" work with strg+s
|
||||
stty -ixon
|
||||
|
||||
|
||||
#################### functions ####################
|
||||
|
||||
# A shortcut function that simplifies usage of xclip.
|
||||
# - Accepts input from either stdin (pipe), or params.
|
||||
# ------------------------------------------------
|
||||
cb() {
|
||||
local _scs_col="\e[0;32m"; local _wrn_col='\e[1;31m'; local _trn_col='\e[0;33m'
|
||||
# Check that xclip is installed.
|
||||
if ! type xclip > /dev/null 2>&1; then
|
||||
echo -e "$_wrn_col""You must have the 'xclip' program installed.\e[0m"
|
||||
# Check user is not root (root doesn't have access to user xorg server)
|
||||
elif [[ "$USER" == "root" ]]; then
|
||||
echo -e "$_wrn_col""Must be regular user (not root) to copy a file to the clipboard.\e[0m"
|
||||
else
|
||||
# If no tty, data should be available on stdin
|
||||
if ! [[ "$( tty )" == /dev/* ]]; then
|
||||
input="$(< /dev/stdin)"
|
||||
# Else, fetch input from params
|
||||
else
|
||||
input="$*"
|
||||
fi
|
||||
if [ -z "$input" ]; then # If no input, print usage message.
|
||||
echo "Copies a string to the clipboard."
|
||||
echo "Usage: cb <string>"
|
||||
echo " echo <string> | cb"
|
||||
else
|
||||
# Copy input to clipboard
|
||||
echo -n "$input" | xclip -selection c
|
||||
# Truncate text for status
|
||||
if [ ''${#input} -gt 80 ]; then input="$(echo $input | cut -c1-80)$_trn_col...\e[0m"; fi
|
||||
# Print status.
|
||||
echo -e "$_scs_col""Copied to clipboard:\e[0m $input"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# a little programm, that changes the ssh config to always be able to acces rpi
|
||||
function rpi(){
|
||||
ssh_dir=~/.ssh
|
||||
if [ "$1" == "l" ]
|
||||
then
|
||||
cp $ssh_dir/rpi/local $ssh_dir/current_rpi_config
|
||||
fi
|
||||
|
||||
if [ "$1" == "local" ]
|
||||
then
|
||||
cp $ssh_dir/rpi/local $ssh_dir/current_rpi_config
|
||||
fi
|
||||
|
||||
if [ "$1" == "r" ]
|
||||
then
|
||||
cp $ssh_dir/rpi/remote $ssh_dir/current_rpi_config
|
||||
fi
|
||||
|
||||
if [ "$1" == "remote" ]
|
||||
then
|
||||
cp $ssh_dir/rpi/remote $ssh_dir/current_rpi_config
|
||||
fi
|
||||
|
||||
if [ "$1" == "w" ]
|
||||
then
|
||||
cp $ssh_dir/rpi/wstunnel $ssh_dir/current_rpi_config
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
# while true -> do cat.....
|
||||
function follow (){
|
||||
while true;
|
||||
do
|
||||
cat $@;
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# little looping func
|
||||
function loop (){
|
||||
if [ "$1" == "-s" ]
|
||||
then
|
||||
for (( i=1; i<=$3; i++ )); do sleep $2; ''${@:4}; done
|
||||
return
|
||||
fi
|
||||
case $1 in
|
||||
${"''"}|*[!0-9]*)
|
||||
# infinit iterations
|
||||
while true; do $@; done
|
||||
return
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
for (( i=1; i<=$1; i++ ));do ''${@:2}; done
|
||||
}
|
||||
|
||||
|
||||
function psk(){
|
||||
ps -e | grep $1 | awk '{print $1}' | xargs kill
|
||||
}
|
||||
|
||||
|
||||
sd() {
|
||||
if [ "$1" == "" ]
|
||||
then
|
||||
sudo $(history | tail -n 2 | head -n 1 | awk '{$1=""; print $0}')
|
||||
else
|
||||
sudo $@
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# rech
|
||||
function rech(){
|
||||
python3 -c "print($@)"
|
||||
}
|
||||
|
||||
|
||||
# map
|
||||
function map(){
|
||||
if [ "$1" == "" ]
|
||||
then
|
||||
bash ~/work/virtchord/reset
|
||||
xmodmap \
|
||||
-e "clear control" \
|
||||
-e "clear mod1" \
|
||||
-e "keycode 64 = Control_L" \
|
||||
-e "keycode 37 = Alt_L" \
|
||||
-e "add control = Control_L" \
|
||||
-e "add mod1 = Alt_L"
|
||||
|
||||
xset r rate 130 85
|
||||
|
||||
elif [ "$1" != "" ]
|
||||
then
|
||||
echo -en "set-map $1" > ~/work/config/virtchord/pipe1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# cf - copy file
|
||||
function cf() { cat "$1" | cb; }
|
||||
|
||||
|
||||
# shorter zathura
|
||||
function zath(){
|
||||
zathura "$@" 2>/dev/null &
|
||||
}
|
||||
|
||||
|
||||
# shorter mupdf
|
||||
function mu(){
|
||||
mupdf "$@" 1>/dev/null 2>/dev/null &
|
||||
}
|
||||
|
||||
|
||||
# ipaa
|
||||
function ipaa(){
|
||||
ip -json addr show $1 | jq -r '.[] | .addr_info[] | select(.family == "inet") | .local'
|
||||
}
|
||||
|
||||
|
||||
# my nixos rebuild
|
||||
function nixre(){
|
||||
if [ "$1" == "boot" ]
|
||||
then
|
||||
nix build github:c2vi/nixos#nixosConfigurations.c2vi-main.config.system.build.toplevel --impure ''${@:2} \
|
||||
&& sudo ./result/bin/switch-to-configuration boot \
|
||||
&& rm ./result
|
||||
else
|
||||
nix build ~/work/config#nixosConfigurations.c2vi-main.config.system.build.toplevel --impure $@ \
|
||||
&& sudo ./result/bin/switch-to-configuration switch \
|
||||
&& rm ./result
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#################### completions ####################
|
||||
complete -cf sudo
|
||||
complete -cf sd
|
||||
complete -W "start stop restart status daemon-reload" stl
|
||||
|
||||
# run
|
||||
complete -W "mnt-wechner sync-school wstunnel hibernate p speed-test-nixos-iso bat bstat mnt-files-local mnt-lan-local mnt-files-remote mnt-lan-remote" ru
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
0
programs/emacs/config.el
Normal file
0
programs/emacs/config.el
Normal file
10
programs/emacs/default.nix
Normal file
10
programs/emacs/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ inputs, self, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-doom-emacs.hmModule
|
||||
];
|
||||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomPrivateDir = "${self}/programs/emacs";
|
||||
};
|
||||
}
|
||||
191
programs/emacs/init.el
Normal file
191
programs/emacs/init.el
Normal file
@@ -0,0 +1,191 @@
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This file controls what Doom modules are enabled and what order they load
|
||||
;; in. Remember to run 'doom sync' after modifying it!
|
||||
|
||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||
;; documentation. There you'll find a "Module Index" link where you'll find
|
||||
;; a comprehensive list of Doom's modules and what flags they support.
|
||||
|
||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||
;; flags as well (those symbols that start with a plus).
|
||||
;;
|
||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
;;(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
;;indent-guides ; highlighted indent columns
|
||||
;;ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink cursor line after big motions
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
;;treemacs ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
vc-gutter ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
(evil +everywhere); come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
;;(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
;;ibuffer ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
;;eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
;;vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
;;docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;;ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
;;gist ; interacting with github gists
|
||||
lookup ; navigate your code and its documentation
|
||||
;;lsp ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
;;make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
;;pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
;;rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||
;;tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
;;cc ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
;;data ; config/data formats
|
||||
;;(dart +flutter) ; paint ui and not much else
|
||||
;;dhall
|
||||
;;elixir ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
;;ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
;;json ; At least it ain't XML
|
||||
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
;;latex ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
org ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
;;python ; beautiful is better than ugly
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
;;racket ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
;;rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
;;web ; the tubes
|
||||
;;yaml ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
;;calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
;;literate
|
||||
(default +bindings +smartparens))
|
||||
0
programs/emacs/packages.el
Normal file
0
programs/emacs/packages.el
Normal file
15
programs/git.nix
Normal file
15
programs/git.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Sebastian Moser";
|
||||
userEmail = "me@c2vi.dev";
|
||||
|
||||
extraConfig = {
|
||||
core.editor = "nvim";
|
||||
core.color.ui = true;
|
||||
core.pager = "delta";
|
||||
extraConfig.core.excludesfile = "~/.config/git/gitignore";
|
||||
};
|
||||
};
|
||||
}
|
||||
38
programs/lf/default.nix
Normal file
38
programs/lf/default.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.lf = {
|
||||
package = pkgs.lf.overrideAttrs (final: prev: {
|
||||
patches = (prev.patches or [ ]) ++ [
|
||||
./lf-filter.patch
|
||||
];
|
||||
checkPhase = "";
|
||||
});
|
||||
|
||||
enable = true;
|
||||
commands = {
|
||||
dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"'';
|
||||
editor-open = ''$$EDITOR $f'';
|
||||
mkdir = ''
|
||||
''${{
|
||||
printf "Directory Name: "
|
||||
read DIR
|
||||
mkdir $DIR
|
||||
}}
|
||||
'';
|
||||
};
|
||||
settings = {
|
||||
preview = true;
|
||||
drawbox = true;
|
||||
icons = true;
|
||||
};
|
||||
keybindings = {
|
||||
"." = "set hidden!";
|
||||
"<enter>" = "open";
|
||||
do = "dragon-out";
|
||||
"gh" = "cd";
|
||||
"g/" = "/";
|
||||
ee = "editor-open";
|
||||
V = ''$${pkgs.bat}/bin/bat --paging=always --theme=gruvbox "$f"'';
|
||||
};
|
||||
};
|
||||
}
|
||||
13
programs/lf/lf-filter.patch
Normal file
13
programs/lf/lf-filter.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/nav.go b/nav.go
|
||||
index c32fc97..95cc2ce 100644
|
||||
--- a/nav.go
|
||||
+++ b/nav.go
|
||||
@@ -1774,7 +1774,7 @@ func searchMatch(name, pattern string) (matched bool, err error) {
|
||||
if gOpts.globsearch {
|
||||
return filepath.Match(pattern, name)
|
||||
}
|
||||
- return strings.Contains(name, pattern), nil
|
||||
+ return strings.HasPrefix(name, pattern), nil
|
||||
}
|
||||
|
||||
func (nav *nav) searchNext() (bool, error) {
|
||||
504
programs/neovim.nix
Normal file
504
programs/neovim.nix
Normal file
@@ -0,0 +1,504 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
withPython3 = true;
|
||||
withNodeJs = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
haskell-vim
|
||||
plenary-nvim
|
||||
# typst ... TODO
|
||||
rust-vim
|
||||
dracula-vim
|
||||
];
|
||||
|
||||
coc.enable = true;
|
||||
coc.settings = {
|
||||
"rust-analyzer.server.path" = "/etc/profiles/per-user/me/bin/rust-analyzer";
|
||||
"coc.preferences.extensionUpdateCheck" = "never";
|
||||
"cSpellExt.enableDictionaries" = [ "german" ];
|
||||
"cSpell.language" = "en,de";
|
||||
"rust-analyzer.enable" = true;
|
||||
"rust-analyzer.diagnostics.enable" = true;
|
||||
"rust-analyzer.checkOnSave.enable" = false;
|
||||
"languageserver" = {
|
||||
"vhdl" = {
|
||||
"command" = "/home/sebastian/work/config/nvim/language-servers/vhdl/vhdl-tool";
|
||||
"args" = [ "lsp" ];
|
||||
"filetypes" = [ "vhdl" ];
|
||||
};
|
||||
"csharp-ls" = {
|
||||
"command" = "csharp-ls";
|
||||
"filetypes" = [ "cs" ];
|
||||
"rootPatterns" = [ "*.csproj" ".vim/" ".git/" ".hg/" ];
|
||||
};
|
||||
"nix" = {
|
||||
"command" = "nil";
|
||||
"filetypes" = [ "nix" ];
|
||||
"rootPatterns" = [ "flake.nix" ];
|
||||
};
|
||||
};
|
||||
"svelte.enable-ts-plugin" = true;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
|
||||
syntax enable
|
||||
filetype plugin indent on
|
||||
|
||||
" the nord colorscheme
|
||||
"source ~/.config/nvim/plugins/nord-vim/colors/nord.vim
|
||||
colorscheme dracula
|
||||
|
||||
autocmd BufReadPost * call Setup()
|
||||
|
||||
function Setup()
|
||||
if index(["typst", "haskell", "tex", "c", "rust", "js", "vhdl"], &syntax) >= 0
|
||||
execute "call Setup_" . &syntax . "()"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
""""""""""""""""""""""""""""" mappings """""""""""""""""""""""""""""
|
||||
nmap <LEFT> gT
|
||||
map <RIGHT> gt
|
||||
imap <LEFT> <ESC>gT
|
||||
imap <RIGHT> <ESC>gt
|
||||
|
||||
map <C-l> gt
|
||||
map <C-h> gT
|
||||
imap <C-l> <ESC>gt
|
||||
imap <C-h> <ESC>gT
|
||||
|
||||
:tnoremap <Esc> <C-\><C-n>
|
||||
:tmap <C-h> <Esc><C-h>
|
||||
:tmap <C-l> <Esc><C-l>
|
||||
|
||||
|
||||
cnoreabbrev ta Te
|
||||
cnoreabbrev hh TSHighlightCapturesUnderCursor
|
||||
|
||||
nnoremap ga :call CocActionAsync('doHover')<ENTER>
|
||||
nnoremap gd :call CocActionAsync('jumpDefinition')<ENTER>
|
||||
|
||||
nmap <C-,> A;<Esc>
|
||||
|
||||
nmap <C-d> <C-d>zz
|
||||
nmap <C-u> <C-u>zz
|
||||
|
||||
nmap # *
|
||||
|
||||
nmap ' /aöeiääääaöfj<ENTER>:<ESC>
|
||||
|
||||
nmap j gj
|
||||
nmap k gk
|
||||
nmap 0 g0
|
||||
nmap $ g$
|
||||
inoremap <C-BS> <ESC>bcw
|
||||
|
||||
cnoreabbrev s set filetype=javascriptreact
|
||||
|
||||
nnoremap <C-n> <cmd>lua require('renamer').rename()<cr>
|
||||
|
||||
"cmap t <TAB>
|
||||
"cmap <C-j> <C-i>
|
||||
"cnoremap <C-k> <S-TAB>
|
||||
"cnoremap <C-i> <C-n>
|
||||
"cnoremap <TAB> <C-n>
|
||||
"cnoremap <C-j> <C-i>
|
||||
"cnoremap <C-j> <TAB>
|
||||
"cnoremap <C-n> <TAB>
|
||||
noremap <ENTER> i<ENTER>
|
||||
set nohlsearch
|
||||
set backupdir=~/.local/state/nvim/backup
|
||||
|
||||
cnoreabbrev cdf :lcd %:p:h
|
||||
cnoreabbrev tspell call CocAction('toggleExtension', 'coc-spell-checker')
|
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""" neovide """""""""""""""""""""""""""""
|
||||
|
||||
" Being able to paste system clipboard in neovide
|
||||
imap <C-v> <ESC>"+pi
|
||||
nmap <C-v> "+p
|
||||
|
||||
vmap <C-c> "+y
|
||||
|
||||
|
||||
let g:neovide_cursor_vfx_mode = "wireframe"
|
||||
set guifont=Hack:h10
|
||||
"set guifont=Monospace:h6
|
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""" coc """""""""""""""""""""""""""""
|
||||
|
||||
imap <C-k> <UP>
|
||||
imap <C-j> <DOWN>
|
||||
imap <C-ENTER> <C-j><ENTER>
|
||||
imap <C-s> <C-j><C-j><ENTER>
|
||||
|
||||
"let g:coc_snippet_next = ${"''"}
|
||||
"let g:coc_snippet_prev = ${"''"}
|
||||
|
||||
"inoremap <expr> <c-j>
|
||||
"\ pumvisible() ? "\<DOWN>" :
|
||||
"\ coc#jumpable() ? "\<c-r>=coc#rpc#request('snippetNext', [])<cr>" :
|
||||
"\ "\<c-j>"
|
||||
"inoremap <expr> <c-k>
|
||||
"\ pumvisible() ? "\<UP>" :
|
||||
"\ coc#jumpable() ? "\<c-r>=coc#rpc#request('snippetPrev', [])<cr>" :
|
||||
"\ "\<c-k>"
|
||||
|
||||
" use enter for completing with coc
|
||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
|
||||
|
||||
|
||||
function! s:TernimalRun(cmd)
|
||||
execute '5new'
|
||||
call termopen(a:cmd, {
|
||||
\ 'on_exit': 's:OnExit',
|
||||
\ 'buffer_nr': bufnr('%'),
|
||||
\})
|
||||
execute 'wincmd p'
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""" languages """""""""""""""""""""""""""""
|
||||
|
||||
" ###### typst ###### "
|
||||
"Typst highlight customisation
|
||||
function Setup_typst()
|
||||
" set highlight of Headings to not be underlined
|
||||
"autocmd TermClose * echo v:shell_error
|
||||
"au TermClose * call feedkeys("ii")
|
||||
:hi! link typstMarkupHeading markdownH1
|
||||
:hi markdownH1 cterm=bold, gui=bold
|
||||
|
||||
" to keep indent the same when making a "-" list
|
||||
set cindent
|
||||
|
||||
cnoreabbrev c call SaveAndCompile_typst()
|
||||
|
||||
function! OnExit(job_id, exit_code, event) dict
|
||||
let lines = line("$")
|
||||
if a:exit_code == "0"
|
||||
"echo "good"
|
||||
call feedkeys("ii")
|
||||
else
|
||||
"echo "bad"
|
||||
endif
|
||||
|
||||
|
||||
endfunction
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
function! SaveAndCompile_typst()
|
||||
:silent w
|
||||
"execute '5new'
|
||||
let path = expand('%:p')
|
||||
:belowright new 20split
|
||||
":belowright 20split call termopen("echo hello")
|
||||
call termopen("typst --root ~/work/config/typst --font-path ~/config/typst/fonts compile " . path . " out.pdf", {
|
||||
\ 'on_exit': 'OnExit',
|
||||
\ 'buffer_nr': bufnr('%'),
|
||||
\})
|
||||
"execute 'wincmd p'
|
||||
":execute '!typst compile ' . expand('%:p')
|
||||
":belowright 20split term://typst compile doku.typ
|
||||
":belowright 20split
|
||||
"s:TernimalRun("!echo hello")
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" ###### js ###### "
|
||||
set tabstop=3 shiftwidth=3
|
||||
function Setup_js()
|
||||
|
||||
"autocmd Filetype js set tabstop=2 shiftwidth=2 expandtab
|
||||
set tabstop=4 shiftwidth=4
|
||||
cnoreabbrev c echo JSSSSSSSSSSSSSSSSSS is interpreted.....
|
||||
" autocmd Filetype setlocal ts=2 sw=2 expandtab
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
" ###### c ###### "
|
||||
function Setup_c()
|
||||
cnoreabbrev c call SaveAndCompile_c()
|
||||
endfunction
|
||||
|
||||
|
||||
function! SaveAndCompile_c()
|
||||
:w
|
||||
execute '!gcc main.c -o main.out; if [ $? -ne 0 ]; then echo ======= ERROR =======; exit; fi ; echo "======= NO ERROR = PROGRAMM ======="; ./main.out'
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
" ###### latex ###### "
|
||||
|
||||
let g:UltiSnipsExpandTrigger = '<tab>'
|
||||
let g:UltiSnipsJumpForwardTrigger = '<c-j>'
|
||||
let g:UltiSnipsJumpBackwardTrigger = '<c-k>'
|
||||
|
||||
function Setup_tex()
|
||||
set tabstop=2 shiftwidth=2
|
||||
"command SaveAndCompilelatex
|
||||
cnoreabbrev c call SaveAndCompile_latex()
|
||||
cnoreabbrev o call Open_latex()<ENTER>
|
||||
|
||||
function Latex_toggle_comment()
|
||||
let line=getline('.')
|
||||
let chars = split(line, '\zs')
|
||||
let index = 0
|
||||
while 1
|
||||
if len(chars) == 0
|
||||
return
|
||||
break
|
||||
endif
|
||||
if chars[index] == " "
|
||||
let index += 1
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if chars[index] == "%"
|
||||
execute 's@^%@@g'
|
||||
else
|
||||
execute 's/^/%/g'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
vnoremap s :call Latex_toggle_comment()<Enter>
|
||||
endfunction
|
||||
|
||||
function SaveAndCompile_latex()
|
||||
:w
|
||||
execute '!pdflatex --output-directory=' . expand('%:p:h') . " " . expand('%:p')
|
||||
endfunction
|
||||
|
||||
function Open_latex()
|
||||
execute '!zathura ./main.pdf 1>/dev/null 2>/dev/null &'
|
||||
endfunction
|
||||
" end latex
|
||||
|
||||
|
||||
" ###### vhdl ###### "
|
||||
|
||||
function Setup_vhdl()
|
||||
function Vhdl_toggle_comment()
|
||||
let line=getline('.')
|
||||
let chars = split(line, '\zs')
|
||||
let index = 0
|
||||
while 1
|
||||
if len(chars) == 0
|
||||
return
|
||||
break
|
||||
endif
|
||||
if chars[index] == " "
|
||||
let index += 1
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if chars[index] == "-"
|
||||
execute 's@^--@@g'
|
||||
else
|
||||
execute 's/^/--/g'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
vnoremap s :call Vhdl_toggle_comment()<Enter>
|
||||
|
||||
endfunction
|
||||
|
||||
" ###### haskell ###### "
|
||||
|
||||
function Setup_haskell()
|
||||
set tabstop=4 shiftwidth=4 expandtab
|
||||
|
||||
"command SaveAndCompile_haskell
|
||||
cnoreabbrev c call SaveAndCompile_haskell()
|
||||
"command Debugger_haskell
|
||||
cnoreabbrev d call Debugger_haskell()
|
||||
endfunction
|
||||
|
||||
|
||||
function SaveAndCompile_haskell()
|
||||
:w
|
||||
execute '!ghc ' . @%
|
||||
endfunction
|
||||
|
||||
|
||||
function Debugger_haskell()
|
||||
:w
|
||||
execute '!ghci ' . @%
|
||||
endfunction
|
||||
|
||||
let g:haskell_classic_highlighting = 0
|
||||
let g:haskell_indent_if = 3
|
||||
let g:haskell_intdent_disable = 0
|
||||
let g:haskell_indent_case = 2
|
||||
let g:haskell_indent_let = 4
|
||||
let g:haskell_indent_where = 6
|
||||
let g:haskell_indent_before_where = 2
|
||||
let g:haskell_indent_after_bare_where = 2
|
||||
let g:haskell_indent_do = 3
|
||||
let g:haskell_indent_in = 1
|
||||
let g:haskell_indent_guard = 2
|
||||
let g:haskell_indent_case_alternative = 1
|
||||
let g:cabal_indent_section = 2
|
||||
|
||||
|
||||
|
||||
" ###### rust ###### "
|
||||
|
||||
function Setup_rust()
|
||||
|
||||
vnoremap s :call Rust_toggle_comment()<Enter>
|
||||
|
||||
cnoreabbrev c call Cargo_ceck()
|
||||
cnoreabbrev r call Cargo_run()
|
||||
cnoreabbrev b call Cargo_build()
|
||||
|
||||
endfunction
|
||||
|
||||
function Cargo_build()
|
||||
:w
|
||||
":term cargo build
|
||||
:belowright 20split term://cargo build
|
||||
endfunction
|
||||
|
||||
function Cargo_run()
|
||||
:w
|
||||
":term cargo run
|
||||
:belowright 20split term://cargo run
|
||||
endfunction
|
||||
|
||||
"tnoremap J :call Cargo_jump()
|
||||
augroup MyTermMappings
|
||||
autocmd!
|
||||
autocmd TermOpen * nnoremap <buffer> J :lua Cargo_jump()<Enter>
|
||||
augroup END
|
||||
|
||||
function Cargo_ceck()
|
||||
:w
|
||||
:belowright 20split term://cargo check
|
||||
endfunction
|
||||
|
||||
function Rust_toggle_comment()
|
||||
let line=getline('.')
|
||||
let chars = split(line, '\zs')
|
||||
let index = 0
|
||||
while 1
|
||||
if len(chars) == 0
|
||||
return
|
||||
break
|
||||
endif
|
||||
if chars[index] == " "
|
||||
let index += 1
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if chars[index] == "/"
|
||||
execute 's@^//@@g'
|
||||
else
|
||||
execute 's/^/\/\//g'
|
||||
endif
|
||||
endfunction
|
||||
'';
|
||||
|
||||
extraLuaConfig = ''
|
||||
function Cargo_jump()
|
||||
local line,c = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
|
||||
|
||||
local line_iter = line
|
||||
local line_to_jump = nil
|
||||
local file_to_jump = nil
|
||||
while true do
|
||||
if (lines[line_iter]:sub(1,6) == "error[") then
|
||||
local split_line = mysplit(lines[line_iter +1], ":")
|
||||
line_to_jump = split_line[2]
|
||||
file_to_jump = split_line[1]:sub(6, -1)
|
||||
break
|
||||
end
|
||||
line_iter = line_iter - 1
|
||||
end
|
||||
|
||||
local buffers = get_buffers()
|
||||
local abs_file_to_jump = vim.fn.getcwd() .. "/" .. file_to_jump
|
||||
|
||||
for i,buf in pairs(buffers) do
|
||||
local name = vim.api.nvim_buf_get_name(buf)
|
||||
if name == abs_file_to_jump then
|
||||
local tab_num = get_tab(name)
|
||||
--vim.cmd("tabn 2")
|
||||
return
|
||||
else
|
||||
end
|
||||
end
|
||||
vim.cmd(":tabnew" .. abs_file_to_jump)
|
||||
end
|
||||
|
||||
function get_tab(name)
|
||||
print("there")
|
||||
local listing = vim.api.nvim_command_output("tabs")
|
||||
for i,line in pairs(mysplit(listing, "\n")) do
|
||||
if line:sub(1,8) == "Tab page" then
|
||||
local tab = line:sub(-1)
|
||||
print("tab:", tab)
|
||||
else
|
||||
local file = line:sub(5,-1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function mysplit (inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={}
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
table.insert(t, str)
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
|
||||
function dump(o)
|
||||
if type(o) == 'table' then
|
||||
local s = '{ '
|
||||
for k,v in pairs(o) do
|
||||
print(k)
|
||||
if type(k) ~= 'number' then k = '"'..k..'"' end
|
||||
s = s .. '['..k..'] = ' .. dump(v) .. ','
|
||||
end
|
||||
return s .. '} '
|
||||
else
|
||||
return tostring(o)
|
||||
end
|
||||
end
|
||||
|
||||
function get_buffers()
|
||||
local buffers = {}
|
||||
|
||||
for buffer = 1, vim.fn.bufnr('$') do
|
||||
local is_listed = vim.fn.buflisted(buffer) == 1
|
||||
table.insert(buffers, buffer)
|
||||
end
|
||||
|
||||
return buffers
|
||||
end
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
14
programs/rofi/default.nix
Normal file
14
programs/rofi/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "Arc-Dark";
|
||||
extraConfig = {
|
||||
modi = "run,filebrowser";
|
||||
color-normal = "#1c2023, #919ba0, #1c2023, #a4a4a4, #1c2023";
|
||||
color-urgent = "argb:00000000, #f43753, argb:00000000, argb:00000000, #e29a49";
|
||||
color-active = "argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49";
|
||||
color-window = "#1c2023, #919ba0, #1c2023";
|
||||
};
|
||||
};
|
||||
}
|
||||
146
programs/ssh.nix
Normal file
146
programs/ssh.nix
Normal file
@@ -0,0 +1,146 @@
|
||||
{ secretsDir, ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
includes = [ "./current_rpi_config" ];
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
identityFile = "${secretsDir}/private-key-main";
|
||||
};
|
||||
hpm = {
|
||||
hostname = "192.168.1.56";
|
||||
user = "root";
|
||||
};
|
||||
|
||||
servers = {
|
||||
hostname = "192.168.1.3";
|
||||
user = "server";
|
||||
identityFile = "${secretsDir}/private-key-main";
|
||||
};
|
||||
|
||||
server = {
|
||||
hostname = "192.168.1.3";
|
||||
user = "admin";
|
||||
identityFile = "${secretsDir}/private-key-main";
|
||||
};
|
||||
|
||||
ocia = {
|
||||
hostname = "140.238.212.229";
|
||||
user = "root";
|
||||
identityFile = "${secretsDir}/private-key-ocia";
|
||||
};
|
||||
|
||||
ocib = {
|
||||
hostname = "140.238.211.43";
|
||||
user = "root";
|
||||
identityFile = "${secretsDir}/private-key-ocib";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".ssh/rpi/local".text = ''
|
||||
Host config
|
||||
HostName 192.168.1.2
|
||||
User config
|
||||
Port 49388
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
#RemoteCommand cd /svn/config; bash
|
||||
|
||||
Host rpi
|
||||
HostName 192.168.1.2
|
||||
User admin
|
||||
Port 49388
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
|
||||
Host files
|
||||
HostName 192.168.1.2
|
||||
User files
|
||||
Port 49388
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
|
||||
Host rpis
|
||||
HostName 192.168.1.2
|
||||
User server
|
||||
Port 49388
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
'';
|
||||
|
||||
home.file.".ssh/rpi/remote".text = ''
|
||||
Host config
|
||||
HostName sebastian.dns.army
|
||||
User config
|
||||
Port 49388
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
#RemoteCommand cd /svn/config; bash
|
||||
|
||||
Host rpi
|
||||
HostName sebastian.dns.army
|
||||
User admin
|
||||
Port 49388
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
|
||||
Host files
|
||||
HostName sebastian.dns.army
|
||||
User files
|
||||
Port 49388
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
|
||||
Host rpis
|
||||
HostName sebastian.dns.army
|
||||
User server
|
||||
Port 49388
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
'';
|
||||
|
||||
home.file.".ssh/rpi/wstunnel".text = ''
|
||||
Host config
|
||||
HostName localhost
|
||||
User config
|
||||
Port 55555
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
#RemoteCommand cd /svn/config; bash
|
||||
|
||||
Host rpi
|
||||
HostName localhost
|
||||
User admin
|
||||
Port 55555
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
|
||||
Host files
|
||||
HostName localhost
|
||||
User files
|
||||
Port 55555
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
|
||||
Host rpis
|
||||
HostName localhost
|
||||
User server
|
||||
Port 55555
|
||||
AddKeysToAgent yes
|
||||
#UseKeychain yes
|
||||
IdentityFile ${secretsDir}/private-key-main
|
||||
'';
|
||||
}
|
||||
41
programs/zathura.nix
Normal file
41
programs/zathura.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
selection-clipboard = "clipboard";
|
||||
roll-step = 40;
|
||||
};
|
||||
mappings = {
|
||||
"<C-y>" = ''scroll down'';
|
||||
"<C-x>" = ''scroll up'';
|
||||
"<C-o>" = ''scroll left'';
|
||||
"<C-p>" = ''scroll right'';
|
||||
|
||||
"j" = ''feedkeys "4<C-y>"'';
|
||||
"k" = ''feedkeys "4<C-x>"'';
|
||||
"h" = ''feedkeys "4<C-o>"'';
|
||||
"l" = ''feedkeys "4<C-p>"'';
|
||||
|
||||
"J" = ''feedkeys "<C-y>"'';
|
||||
"K" = ''feedkeys "<C-x>"'';
|
||||
"H" = ''feedkeys "<C-o>"'';
|
||||
"L" = ''feedkeys "<C-p>"'';
|
||||
|
||||
"y" = ''zoom in'';
|
||||
"+" = ''feedkeys "yyy"'';
|
||||
"*" = ''feedkeys "y"'';
|
||||
|
||||
"x" = ''zoom out'';
|
||||
"-" = ''feedkeys "xxx"'';
|
||||
"_" = ''feedkeys "x"'';
|
||||
|
||||
"n" = ''navigate next'';
|
||||
"p" = ''navigate previous'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user