Merge branch 'master' of https://gitlab.com/fschl/dotfiles
* 'master' of https://gitlab.com/fschl/dotfiles: fix some typos add nvidia sources for nvidia-docker add missing programs update go install try to use spacemacs add primitive script to get image tags from hub.docker.com
This commit is contained in:
commit
1c6e30dc83
82
.dockerfunc
82
.dockerfunc
|
@ -113,6 +113,23 @@ arduino() {
|
|||
arduino
|
||||
}
|
||||
|
||||
audacity(){
|
||||
del_stopped audacity
|
||||
# -e QT_DEVICE_PIXEL_RATIO \
|
||||
|
||||
docker run -d \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
-e "DISPLAY=unix${DISPLAY}" \
|
||||
-v $HOME/Downloads:/root/Downloads \
|
||||
-v $HOME/Documents:/root/Documents \
|
||||
-v $HOME/Music:/root/Music \
|
||||
--device /dev/snd \
|
||||
--group-add audio \
|
||||
--name audacity \
|
||||
jess/audacity
|
||||
}
|
||||
|
||||
bro() {
|
||||
docker run -it --rm \
|
||||
${DOCKER_REPO_PREFIX}/bropages \
|
||||
|
@ -256,6 +273,39 @@ oxygen() {
|
|||
# exit 0;
|
||||
}
|
||||
|
||||
photon() {
|
||||
# del_stopped papyrus
|
||||
|
||||
MYUSERID=$(id --user)
|
||||
|
||||
echo "starting papyrus with uid"
|
||||
echo $MYUSERID
|
||||
|
||||
# -v $BASE/.eclipse:/home/eclipse/.eclipse/ \
|
||||
# -v $BASE/.gradle:/home/eclipse/.gradle/ \
|
||||
# -v $BASE/.egradle:/home/eclipse/.egradle/ \
|
||||
# -v $BASE/plugins:/opt/eclipse/plugins/ \
|
||||
# -v $BASE/configuration:/opt/eclipse/configuration \
|
||||
|
||||
|
||||
local BASE="/media/driveBay/Backups/eclipse-configs/oxygen_configs"
|
||||
docker run -it \
|
||||
--net host \
|
||||
--name="photon" \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
-e DISPLAY=unix$DISPLAY \
|
||||
-v $HOME/projects/java/workspace:/home/eclipse/workspace \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v $(which docker):/bin/docker \
|
||||
--user $MYUSERID \
|
||||
--device /dev/video0 \
|
||||
--group-add audio \
|
||||
--group-add video \
|
||||
${DOCKER_REPO_PREFIX}/eclipse:photon \
|
||||
sh -c "/opt/eclipse/eclipse"
|
||||
|
||||
# exit 0;
|
||||
}
|
||||
|
||||
|
||||
gimp() {
|
||||
|
@ -375,27 +425,27 @@ java() {
|
|||
|
||||
}
|
||||
|
||||
latex() {
|
||||
del_stopped latex
|
||||
# latex() {
|
||||
# del_stopped latex
|
||||
|
||||
docker run -it --rm \
|
||||
--net host \
|
||||
-v $(pwd):/usr/src/latex \
|
||||
--workdir="/usr/src/latex" \
|
||||
${DOCKER_REPO_PREFIX}/latex "$@"
|
||||
}
|
||||
# docker run -it --rm \
|
||||
# --net host \
|
||||
# -v $(pwd):/usr/src/latex \
|
||||
# --workdir="/usr/src/latex" \
|
||||
# ${DOCKER_REPO_PREFIX}/latex "$@"
|
||||
# }
|
||||
|
||||
pdflatex() {
|
||||
local file=$@
|
||||
local cur_dir=$(pwd)
|
||||
local FILENAME=${file%%.*}
|
||||
# pdflatex() {
|
||||
# local file=$@
|
||||
# local cur_dir=$(pwd)
|
||||
# local FILENAME=${file%%.*}
|
||||
|
||||
latex bash -c "latex $file; latex $file; pdflatex $file"
|
||||
# latex bash -c "latex $file; latex $file; pdflatex $file"
|
||||
|
||||
sudo rm $FILENAME.aux $FILENAME.dvi $FILENAME.out
|
||||
# sudo rm $FILENAME.aux $FILENAME.dvi $FILENAME.out
|
||||
|
||||
sudo chown ${DOCKER_REPO_PREFIX}:${DOCKER_REPO_PREFIX} $FILENAME.pdf
|
||||
}
|
||||
# sudo chown ${DOCKER_REPO_PREFIX}:${DOCKER_REPO_PREFIX} $FILENAME.pdf
|
||||
# }
|
||||
|
||||
libreoffice() {
|
||||
del_stopped libreoffice
|
||||
|
|
|
@ -109,7 +109,7 @@ assign [class="^Firefox$"] $WS1
|
|||
assign [class="^Eclipse$"] $WS5
|
||||
assign [class=".*\ -\ Oracle\ VM\ Virtualbox$"] $WS5
|
||||
assign [class="^Thunderbird$"] $WS4
|
||||
assign [class=".*KeePass.*"] $WS8
|
||||
assign [class="^KeePassXC$"] $WS8
|
||||
|
||||
# https://faq.i3wm.org/question/3726/workspace-output-multiple-values/index.html%3Fanswer=3731.html#post-id-3731
|
||||
set $LAPTOP LVDS-1
|
||||
|
|
1
.profile
1
.profile
|
@ -21,4 +21,3 @@ if [ -d "$HOME/bin" ] ; then
|
|||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
#[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
|
||||
|
|
20
.spacemacs
20
.spacemacs
|
@ -38,22 +38,27 @@ values."
|
|||
'(
|
||||
better-defaults
|
||||
auto-completion
|
||||
bibtex
|
||||
docker
|
||||
emacs-lisp
|
||||
git
|
||||
go
|
||||
graphviz
|
||||
helm
|
||||
html
|
||||
latex
|
||||
markdown
|
||||
org
|
||||
python
|
||||
shell
|
||||
shell-scripts
|
||||
spell-checking
|
||||
syntax-checking
|
||||
version-control
|
||||
yaml
|
||||
;; (shell :variables
|
||||
;; shell-default-height 30
|
||||
;; shell-default-position 'bottom)
|
||||
;; spell-checking
|
||||
)
|
||||
;; List of additional packages that will be installed without being
|
||||
;; wrapped in a layer. If you need some configuration for these
|
||||
|
@ -108,7 +113,7 @@ values."
|
|||
;; (default 'vim)
|
||||
dotspacemacs-editing-style 'vim
|
||||
;; If non nil output loading progress in `*Messages*' buffer. (default nil)
|
||||
dotspacemacs-verbose-loading nil
|
||||
dotspacemacs-verbose-loading t
|
||||
;; Specify the startup banner. Default value is `official', it displays
|
||||
;; the official spacemacs logo. An integer value is the index of text
|
||||
;; banner, `random' chooses a random text banner in `core/banners'
|
||||
|
@ -137,12 +142,11 @@ values."
|
|||
dotspacemacs-colorize-cursor-according-to-state t
|
||||
;; Default font, or prioritized list of fonts. `powerline-scale' allows to
|
||||
;; quickly tweak the mode-line size to make separators look not too crappy.
|
||||
;; dotspacemacs-default-font '("Source Code Pro"
|
||||
dotspacemacs-default-font '("DejaVu Sans Mono"
|
||||
:size 12
|
||||
dotspacemacs-default-font '("Source Code Pro"
|
||||
:size 11
|
||||
:weight normal
|
||||
:width normal
|
||||
:powerline-scale 0.9)
|
||||
:powerline-scale 0.6)
|
||||
;; The leader key
|
||||
dotspacemacs-leader-key "SPC"
|
||||
;; The key used for Emacs commands (M-x) (after pressing on the leader key).
|
||||
|
@ -271,7 +275,7 @@ values."
|
|||
dotspacemacs-folding-method 'evil
|
||||
;; If non-nil smartparens-strict-mode will be enabled in programming modes.
|
||||
;; (default nil)
|
||||
dotspacemacs-smartparens-strict-mode nil
|
||||
dotspacemacs-smartparens-strict-mode t
|
||||
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
|
||||
;; over any automatically added closing parenthesis, bracket, quote, etc…
|
||||
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
|
||||
|
@ -331,7 +335,7 @@ you should place your code here."
|
|||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(unfill mwim web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode company-web web-completion-data go-guru go-eldoc company-go go-mode yaml-mode smeargle orgit org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download mmm-mode markdown-toc markdown-mode magit-gitflow htmlize helm-gitignore helm-company helm-c-yasnippet gnuplot gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md fuzzy evil-magit magit magit-popup git-commit ghub treepy let-alist graphql with-editor diff-hl company-statistics company auto-yasnippet yasnippet ac-ispell auto-complete dockerfile-mode ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))))
|
||||
(company-auctex auctex flycheck-pos-tip pos-tip flycheck docker json-mode tablist docker-tramp json-snatcher json-reformat unfill mwim web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode company-web web-completion-data go-guru go-eldoc company-go go-mode yaml-mode smeargle orgit org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download mmm-mode markdown-toc markdown-mode magit-gitflow htmlize helm-gitignore helm-company helm-c-yasnippet gnuplot gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md fuzzy evil-magit magit magit-popup git-commit ghub treepy let-alist graphql with-editor diff-hl company-statistics company auto-yasnippet yasnippet ac-ispell auto-complete dockerfile-mode ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
|
2
Makefile
2
Makefile
|
@ -22,4 +22,4 @@ bins:
|
|||
done
|
||||
|
||||
bootstrap:
|
||||
bash ./install.sh
|
||||
bash ./install.sh base
|
||||
|
|
14
README.org
14
README.org
|
@ -72,19 +72,19 @@
|
|||
|
||||
**** Backup Secure Keys
|
||||
|
||||
- get 2 USB Thumb drives
|
||||
- get 2 USB thumb drives
|
||||
- on each, create 2 partitions (ext4, you will never use them on any windows device anyway)
|
||||
- https://wiki.archlinux.org/index.php/Dm-crypt/Device_Encryption
|
||||
|
||||
Nowadays it's mere chance to find a USB Thumb Drive with less than 4GB storage.
|
||||
Though, you want a dedicated Drive to transport your password database, ssh keys and GPG keys.
|
||||
Those dont require more than a couple MB. So what to do with the remaining space?
|
||||
Nowadays it's mere chance to find a USB thumb drive with less than 4GB storage.
|
||||
Though, you want a dedicated drive to transport your password database, ssh keys and GPG keys.
|
||||
Those don't require more than a couple MB. So what to do with the remaining space?
|
||||
|
||||
Scenarios:
|
||||
|
||||
- You visit friends, only have your keys with you and you have to check your mails, assist a colleague
|
||||
in some network/ops emergency or just securely look up some important information.
|
||||
- A family member calls, their HDD just died and you are asked to quickly help out on recovery.
|
||||
in some network/ops emergency or just securely look up some confidential information.
|
||||
- A family member calls: their HDD just died and you are asked to quickly help out on recovery.
|
||||
|
||||
Boot into a safe environment, having all your credentials available in a secure manner.
|
||||
Have a bootable forensics toolbox around to quickly get going in a familiar setup.
|
||||
|
@ -109,5 +109,5 @@
|
|||
|
||||
- [ ] explain setup, ideas, practises
|
||||
- [ ] add HOWTO
|
||||
- [ ] seperate sources.list setup for server/desktop
|
||||
- [ ] seperate sources.list setup for server/desktop/laptop
|
||||
- [ ] move to ansible for easier modularization of setup
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set +x
|
||||
set +e
|
||||
set +o pipefail
|
||||
|
||||
image=$1
|
||||
curl -s "https://registry.hub.docker.com/v2/repositories/${image}/tags/" | jq -r '."results"[]["name"]'
|
|
@ -3,6 +3,7 @@
|
|||
#: lmount
|
||||
#: open + mount luks encrypted storage
|
||||
#:
|
||||
#: https://unix.stackexchange.com/questions/445652/how-to-mount-and-de-encrypt-a-luks-encrypted-partition-to-recover-files
|
||||
set -e
|
||||
set -o pipefail
|
||||
set -x
|
||||
|
@ -30,10 +31,10 @@ main() {
|
|||
fi
|
||||
|
||||
echo "Opening ${device} as ${luksname}"
|
||||
sudo cryptsetup open ${device} ${luksname}
|
||||
cryptsetup open ${device} ${luksname}
|
||||
|
||||
echo " ... mounting to ${target}"
|
||||
sudo mount /dev/mapper/${luksname} ${target}
|
||||
mount /dev/mapper/${luksname} ${target}
|
||||
|
||||
echo "done..."
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ base_applications() {
|
|||
ca-certificates \
|
||||
cmake \
|
||||
coreutils \
|
||||
cryptsetup \
|
||||
curl \
|
||||
dnsutils \
|
||||
gcc \
|
||||
|
@ -74,6 +75,7 @@ base_applications() {
|
|||
tar \
|
||||
tmux \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
zip \
|
||||
--no-install-recommends
|
||||
|
@ -136,6 +138,17 @@ no_suspend() {
|
|||
$SUDO systemctl restart systemd-logind.service
|
||||
}
|
||||
|
||||
install_nvidia_docker() {
|
||||
# get latest driver from https://www.nvidia.com/object/unix.html
|
||||
# https://github.com/NVIDIA/nvidia-docker/wiki/Installation-(version-2.0)#prerequisites
|
||||
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
|
||||
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
|
||||
sudo apt-get update
|
||||
|
||||
# Install nvidia-docker2 and reload the Docker daemon configuration
|
||||
sudo apt-get install -y nvidia-docker2
|
||||
sudo pkill -SIGHUP dockerd
|
||||
}
|
||||
install_i3() {
|
||||
echo "update and installing i3wm and some tools..."
|
||||
|
||||
|
@ -291,15 +304,12 @@ get_dotfiles() {
|
|||
|
||||
# TODO: propbably dont really need the whole repo
|
||||
git clone https://gitlab.com/fschl/dockerfiles.git "/home/$USERNAME/dockerfiles"
|
||||
|
||||
# TODO: on the server? really?
|
||||
git clone https://gitlab.com/fschl/.emacs.d.git "/home/$USERNAME/.emacs.d"
|
||||
)
|
||||
}
|
||||
|
||||
# install/update golang from source
|
||||
install_golang() {
|
||||
export GO_VERSION=1.7.4
|
||||
export GO_VERSION=1.11.2
|
||||
export GO_SRC=/usr/local/go
|
||||
|
||||
# if we are passing the version
|
||||
|
@ -319,10 +329,12 @@ install_golang() {
|
|||
go get github.com/golang/lint/golint
|
||||
go get golang.org/x/tools/cmd/cover
|
||||
go get golang.org/x/review/git-codereview
|
||||
go get golang.org/x/tools/cmd/goimports
|
||||
go get golang.org/x/tools/cmd/gorename
|
||||
|
||||
go get github.com/nsf/gocode
|
||||
go get -u -v github.com/rogpeppe/godef
|
||||
go get -u -v golang.org/x/tools/cmd/guru
|
||||
go get -u -v golang.org/x/tools/cmd/gorename
|
||||
go get -u -v golang.org/x/tools/cmd/goimports
|
||||
go get github.com/mdempsky/gocode
|
||||
#done
|
||||
)
|
||||
}
|
||||
|
@ -415,7 +427,7 @@ main() {
|
|||
;;
|
||||
go)
|
||||
install_golang
|
||||
get_public_go_projects
|
||||
# get_public_go_projects
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue