Compare commits

...

23 Commits

Author SHA1 Message Date
c0d903524a found it like this
All checks were successful
continuous-integration/drone/push Build is passing
2020-07-08 00:26:10 -07:00
be7c3a3963 remove some git pkgs 2020-05-26 00:36:12 -07:00
9acfb54dfb nix metapackage works 2020-05-26 00:35:49 -07:00
22de9e5fac seems to build now
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-26 00:07:46 -07:00
e59a1b5085 latest
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-16 04:28:48 -07:00
8e0ade5673 latest
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-13 05:23:30 -07:00
9f7ff8fec8 set env vars for locale
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-11 16:44:10 -07:00
fa11fa8b9b fix node install 2020-04-11 16:43:53 -07:00
8be534dd2c fixing error msgs 2020-04-11 16:41:22 -07:00
3a0c174769 fix some bugs
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-11 16:11:49 -07:00
7bc4fbffc5 incorporate pyenv, nvm, profile scripts, autolink ~/dev
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-11 14:30:50 -07:00
19a607971c add vim-plug to image 2020-04-11 13:55:42 -07:00
f21c9b8be9 remove command-not-found for now until it isnt broken 2020-04-11 13:55:21 -07:00
96b68fe623 sets permissions on user homedir
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-11 13:28:28 -07:00
4127d1d8b1 move /home/$USERNAME to always be /home/user
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-11 12:59:14 -07:00
a53143c0d0 fix
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-11 12:50:52 -07:00
b56b3e4355 fix
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-11 12:27:32 -07:00
f5c7654cc8 fix var names, move paths, upgrade pip
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-11 12:18:22 -07:00
07788af7cc rename setup dir to build
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-11 12:09:15 -07:00
9e04a5fdf7 install root overlay before doing build scripts 2020-04-11 12:08:25 -07:00
1f7c0bc105 fix build args to use german mirror on ci
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-11 12:00:08 -07:00
b6e0d95523 update readme
Some checks failed
continuous-integration/drone/push Build was killed
2020-04-11 11:58:21 -07:00
09ccfe26fd testing
Some checks failed
continuous-integration/drone/push Build was killed
2020-04-11 11:55:50 -07:00
28 changed files with 753 additions and 140 deletions

View File

@@ -4,12 +4,16 @@ name: default
steps:
- name: docker
image: plugins/docker
build_args:
- UBUNTU_MIRROR=http://de.archive.ubuntu.com/ubuntu
settings:
repo: sneak/work
dry_run: true
#auto_tag: true
#dry_run: true
build_args:
- UBUNTU_MIRROR=http://de.archive.ubuntu.com/ubuntu
username:
from_secret: docker_username
password:
from_secret: docker_password
tags:
- ${DRONE_BRANCH//\//-}-${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_SHA}
- ${DRONE_BRANCH}
- ${DRONE_BRANCH/\//-}

View File

@@ -1,12 +1,13 @@
FROM ubuntu@sha256:8e1c1ee12a539d652c371ee2f4ee66909f4f5fd8002936d8011d958f05faf989
# focal as of 2020-04-23
FROM ubuntu@sha256:5747316366b8cc9e3021cd7286f42b2d6d81e3d743e2ab571f55bcd5df788cc8
ENV DEBIAN_FRONTEND noninteractive
ARG UBUNTU_MIRROR=http://us.archive.ubuntu.com/ubuntu
ARG UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu
ARG UID_TO_ADD=1000
ARG GID_TO_ADD=1000
ARG USERNAME_TO_ADD=sneak
ARG USERNAME_TO_ADD=user
RUN \
echo "deb $UBUNTU_MIRROR focal main universe restricted multiverse" > /etc/apt/sources.list.new && \
@@ -15,28 +16,192 @@ RUN \
echo "deb $UBUNTU_MIRROR focal-backports main universe restricted multiverse" >> /etc/apt/sources.list.new && \
mv /etc/apt/sources.list.new /etc/apt/sources.list
RUN \
groupadd -g $GID_TO_ADD $USERNAME_TO_ADD && \
groupadd nixbld && \
useradd -u $UID_TO_ADD -g $GID_TO_ADD --home-dir /home/user -m -s /bin/bash $USERNAME_TO_ADD && \
usermod -p '*' $USERNAME_TO_ADD
ADD https://sneak.cloud/authorized_keys /root/.ssh/authorized_keys
ADD https://sneak.cloud/authorized_keys /home/user/.ssh/authorized_keys
# we only install essential system packages here
ARG SYSTEM_PACKAGES="build-essential ca-certificates openssh-server git golang rsync runit locales"
ARG SYSTEM_PACKAGES="\
anacron \
apt-transport-https \
build-essential \
byobu \
ca-certificates \
cron \
cronic \
curl \
git \
golang \
locales \
openssh-server \
rsync \
runit \
sudo \
tmux \
"
RUN /bin/bash -c "echo -e 'Y\n\n' | /usr/local/sbin/unminimize"
RUN \
apt update && \
apt -y upgrade && \
apt -y install $SYSTEM_PACKAGES && \
groupadd -g $GID_TO_ADD $USERNAME_TO_ADD && \
useradd -u $UID_TO_ADD -g $GID_TO_ADD -s /bin/bash $USERNAME_TO_ADD && \
usermod -p '*' $USERNAME_TO_ADD && \
go get -v -u github.com/peterbourgon/runsvinit && \
cp /root/go/bin/runsvinit /usr/local/sbin/runsvinit && \
rm -rf /root/go && \
rm /etc/ssh/*host*key*
rm /etc/ssh/*host*key* && \
apt -y purge golang && \
apt -y autoremove
COPY ./setup /tmp/setup
RUN bash /tmp/setup/run.sh
# nix for pkgs pls
RUN mkdir /nix && chown user:user /nix
ARG OTHER_PACKAGES=" \
apt-utils \
aspell \
aspell-en \
automake \
avahi-daemon \
avahi-utils \
bash-completion \
bc \
bind9-host \
bonnie++ \
build-essential \
byobu \
ca-certificates \
cmake \
curl \
daemontools \
debmirror \
default-jdk \
default-jre \
diffstat \
dnsutils \
docker.io \
dos2unix \
editorconfig \
ffmpeg \
fonts-indic \
fonts-ipafont-gothic \
fonts-ipafont-mincho \
fortune \
git \
gnupg2 \
gnupg-agent \
golang-go \
host \
imagemagick \
iputils-ping \
irssi \
jq \
lcov \
ldap-auth-client \
ldap-utils \
libasound2 \
libatk1.0-0 \
libboost-all-dev \
libbz2-dev \
libdb++-dev \
libffi-dev \
libgconf-2-4 \
libgtk-3-0 \
libjpeg-dev \
liblzma-dev \
libncurses5-dev \
libnss3 \
libnss-mdns \
libpng-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libxcursor1 \
libxml2 \
libxml2-dev \
libxmlsec1-dev \
libxslt1-dev \
llvm \
locales \
lsof \
mailutils \
make \
man \
man-db \
mercurial \
mosh \
mutt \
netcat-openbsd \
nmap \
nscd \
openssh-server \
pandoc \
pass \
pbzip2 \
pinentry-curses \
pkg-config \
psmisc \
pv \
pwgen \
python3 \
python3-dev \
python3-pip \
rbenv \
rsync \
rsyslog \
rsyslog-gnutls \
rsyslog-relp \
screen \
snmp \
snmpd \
socat \
software-properties-common \
strace \
sudo \
tcpdump \
telnet \
texlive-latex-base \
tk-dev \
tmux \
tree \
ttf-wqy-microhei \
ttf-wqy-zenhei \
vagrant \
vim \
vim-gtk \
wamerican-insane \
wget \
xterm \
xz-utils \
zfsutils-linux \
zip \
zlib1g-dev \
"
#RUN apt -y install $OTHER_PACKAGES
USER root
ENV HOME /root
COPY ./root /
COPY ./build /tmp/build
RUN bash /tmp/build/root.sh
USER user
ENV HOME /home/user
RUN bash /tmp/build/user.sh
USER root
ENV HOME /root
RUN rm -rf /tmp/build
RUN chsh --shell /home/user/.nix-profile/bin/zsh user
RUN chmod +rx /etc/service/*/run
CMD ["/usr/local/sbin/runsvinit"]

View File

@@ -1,4 +1,13 @@
default: build
#export DOCKER_HOST := ssh://las1.eeqj.de
.PHONY: build
build:
sudo docker build . 2>&1 | tee -a build.log
docker build \
--build-arg UBUNTU_MIRROR=http://us.archive.ubuntu.com/ubuntu \
-t sneak/work \
. \
2>&1 | tee -a build.log
enter:
docker run -ti --rm=true -e HOME=/home/user -e USER=user --user=user -v /home/sneak:/home/user/.home sneak/work /home/user/.nix-profile/bin/zsh -l

View File

@@ -2,6 +2,13 @@
sneak's working environment
# todo
* zsh configuration
* powerline setup
* test vimrc
* ssh-agent setup inside container from zshrc
# license
wtfpl

View File

@@ -4,15 +4,12 @@ pushd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)/../"
docker build -t sneak/work .
popd
docker rm -f work
# FIXME ssh host keys
docker run \
-d \
--name work \
-v /:/hostroot \
-v /home/sneak/.ssh/id_rsa:/home/sneak/.ssh/id_rsa \
-v /home/sneak/.ssh/config:/home/sneak/.ssh/config \
-v /home/sneak/.ssh/known_hosts:/home/sneak/.ssh/known_hosts \
-v /home/sneak/Documents:/home/sneak/Documents \
-v /home/sneak:/hosthome \
-v /var/run/docker.sock:/var/run/docker.sock \
sneak/work

50
build/root.sh Normal file
View File

@@ -0,0 +1,50 @@
#!/bin/bash
echo "##### build/root.sh"
export LANG="en_US.UTF-8"
export LANGUAGE="en_US:en"
set -x
set -e
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
cd "$TD"
SSH_HOST_KEY_FILES="
ssh_host_ecdsa_key
ssh_host_ecdsa_key.pub
ssh_host_ed25519_key
ssh_host_ed25519_key.pub
ssh_host_rsa_key
ssh_host_rsa_key.pub
"
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen en_US.UTF-8
update-locale LANG="en_US.UTF-8" LANGUAGE="en_US"
dpkg-reconfigure locales
for FN in $SSH_HOST_KEY_FILES ; do
ln -s /hostroot/etc/ssh/$FN /etc/ssh/$FN
done
ln -s /hostroot/root /root/.home
# install other stuff here
# FIXME do these with nix:
#pip3 install -U pip
#pip3 install black
# install python packages
# install yarn
# install prettier
# install vim-go
mkdir -p /home/user/.ssh
cp /root/.ssh/authorized_keys /home/user/.ssh/authorized_keys
chown -R $UID_TO_ADD:$GID_TO_ADD /home/user
echo "$USERNAME_TO_ADD ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user

62
build/user.sh Normal file
View File

@@ -0,0 +1,62 @@
#!/bin/bash
set -x
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
U="user"
export HOME=/home/user
export USER=user
export LC_ALL=en_US
export LANG=en_US.UTF-8
# original home
OH="/hosthome"
# link ~/.home to original home
ln -s "/hosthome" $HOME/.home
#vim -s ~/.vimrc -c 'q!'
# vim-plug
# this should happen from vimrc
#curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# /nix is already created for us and chowned to us by now:
curl -L https://nixos.org/nix/install | sh
source /home/user/.nix-profile/etc/profile.d/nix.sh
# this should install all the packages from the config.nix:
nix-env -i myPackages
# FIXME have this pull from synced dir instead
# oh-my-zsh
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/installomz.sh
export ZSH="$HOME/.zsh"
export KEEP_ZSHRC=yes
zsh /tmp/installomz.sh && rm /tmp/installomz.sh
###############################################################################
##### Personal Config
###############################################################################
# I had envisioned this image as adaptable to other users but I've decided
# to abandon that hope and hardcode my own values in here.
git config --global user.email sneak@sneak.berlin
git config --global user.name sneak
mkdir -p ~/.paths
# TODO FIXME change the syncthing paths on las1 when convenient sometime
ln -s ~/.home/Documents/syncthing/folders/sync ~/.paths/sneak-sync
ln -s ~/.home/Documents/syncthing/folders/scratch ~/.paths/sneak-scratch
ln -s ~/.home/Documents/syncthing/folders/sneak-docs ~/.paths/sneak-docs
ln -s ~/.paths/sneak-docs ~/Documents
ln -s ~/.paths/sneak-scratch/dev ~/dev
ln -s ~/.paths/sneak-sync/dotfiles/weechat ~/.weechat
ln -s ~/.paths/sneak-sync/ssh/config ~/.ssh/config
# link in ssh key from original home
mkdir -p ~/.ssh
ln -s ~/.paths/sneak-sync/secrets/ssh/pixel16/id_rsa ~/.ssh/id_rsa
ln -s ~/.paths/sneak-sync/secrets/ssh/pixel16/id_rsa.pub ~/.ssh/id_rsa.pub

View File

@@ -0,0 +1,3 @@
#!/bin/bash
exec /usr/sbin/sshd -D

View File

@@ -0,0 +1,33 @@
{
packageOverrides = pkgs: with pkgs; {
myPackages = pkgs.buildEnv {
name = "myPackages";
paths = [
aspell
bc
clang
coreutils
ctags
curl
ffmpeg
gdb
git
gnupg
go
jq
nix-prefetch-scripts
openssh
pwgen
qemu
tmux
tree
vim
weechat
wget
zsh
];
};
};
}

View File

@@ -0,0 +1,2 @@
export LANG="en_US.UTF-8"
export LANGUAGE="en_US:en"

View File

@@ -0,0 +1,3 @@
alias unsafessh="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
alias prettier="prettier --tab-width 4"
alias gencapkey="ssh-keygen -m PEM -t rsa -b 2048 -C \"caprover\" -f ./key -q -N \"\""

View File

@@ -0,0 +1,2 @@
export EDITOR=vim

View File

@@ -0,0 +1,10 @@
export GOPATH="$HOME/dev/go"
if [[ -d /usr/local/go/bin ]]; then
export PATH="$PATH:/usr/local/go/bin"
fi
if [[ -d "$GOPATH/bin" ]]; then
export PATH="$PATH:$GOPATH/bin"
fi

View File

@@ -0,0 +1,7 @@
if [[ -d "$HOME/.local/bin" ]]; then
export PATH="$PATH:$HOME/.local/bin"
fi
if [[ -d "$HOME/bin" ]]; then
export PATH="$PATH:$HOME/bin"
fi

View File

@@ -0,0 +1,10 @@
export HOMEBREW_NO_ANALYTICS=1
export GATSBY_TELEMETRY_DISABLED=1
export STNOUPGRADE=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export SAM_CLI_TELEMETRY=0
export AZURE_CORE_COLLECT_TELEMETRY=0
export DO_NOT_TRACK=1
if command -v gcloud >/dev/null 2>&1 >/dev/null ; then
gcloud config set disable_usage_reporting true >/dev/null 2>&1
fi

View File

@@ -0,0 +1 @@
git config --global push.default matching

View File

@@ -0,0 +1,6 @@
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if which pyenv 2>&1 > /dev/null ; then
eval "$(pyenv init -)"
fi

View File

@@ -0,0 +1,5 @@
export NVM_DIR="$HOME/.nvm"
if [[ -e "$NVM_DIR/nvm.sh" ]]; then
source "$NVM_DIR/nvm.sh"
fi

View File

@@ -0,0 +1,19 @@
if [ -n "$BASH_VERSION" ]; then
HISTSIZE=10000
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
HISTFILESIZE=2000000
# Append to history instead of overwrite
shopt -s histappend
# Ignore redundant or space commands
HISTCONTROL=ignoreboth
# Ignore more
HISTIGNORE='ls:ll:ls -alh:pwd:clear:history'
# Set time format
HISTTIMEFORMAT='%F %T '
# Multiple commands on one line show up as a single line
shopt -s cmdhist
# Append new history lines, clear the history list, re-read the history list, print prompt.
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
fi

View File

@@ -0,0 +1,8 @@
if [ -n "$BASH_VERSION" ]; then
if which kubectl 2>&1 > /dev/null ; then
source <(kubectl completion bash)
fi
alias k=kubectl
complete -F __start_kubectl k
fi

View File

@@ -0,0 +1,9 @@
ZGP="$HOME/Library/Homebrew/opt/zsh-git-prompt/zshrc.sh"
if [ -n "$ZSH_VERSION" ]; then
if [[ -e "$ZGP" ]]; then
source "$ZGP"
fi
export PROMPT='%m:%~ $(git_super_status)$ '
fi

View File

@@ -0,0 +1 @@
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd

16
root/home/user/.toprc Normal file
View File

@@ -0,0 +1,16 @@
top's Config File (Linux processes with windows)
Id:i, Mode_altscr=0, Mode_irixps=1, Delay_time=1.0, Curwin=0
Def fieldscur=¥¨³´»½ÀÄ·º¹Å&')*+,-./012568<>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=162740, sortindx=18, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=1, msgsclr=1, headclr=3, taskclr=1
Job fieldscur=¥¦¹·º(³´Ä»½@<§Å)*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=195508, sortindx=0, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=6, msgsclr=6, headclr=7, taskclr=6
Mem fieldscur=¥º»<½¾¿ÀÁMBNÃD34·Å&'()*+,-./0125689FGHIJKLOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=195508, sortindx=21, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=5, msgsclr=5, headclr=4, taskclr=5
Usr fieldscur=¥¦§¨ª°¹·ºÄÅ)+,-./1234568;<=>?@ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=195380, sortindx=3, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=3, msgsclr=3, headclr=2, taskclr=3
Fixed_widest=0, Summ_mscale=0, Task_mscale=0, Zero_suppress=0

198
root/home/user/.vimrc Normal file
View File

@@ -0,0 +1,198 @@
"execute pathogen#infect()
silent !mkdir -p ~/.vim/backup > /dev/null 2>&1
silent !mkdir -p ~/.vim/undo > /dev/null 2>&1
silent !mkdir -p ~/.vim/swap > /dev/null 2>&1
silent !mkdir -p ~/.vim/autoload > /dev/null 2>&1
silent !mkdir -p ~/.vim/plugged > /dev/null 2>&1
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
source ~/.vim/autoload/plug.vim
call plug#begin('~/.vim/plugged')
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Plug 'roxma/vim-hug-neovim-rpc'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
"Plug 'edkolev/tmuxline.vim'
Plug 'zchee/deoplete-go', { 'for': 'go' }
Plug 'zchee/deoplete-jedi', { 'for': 'python' }
Plug 'vim-syntastic/syntastic'
set statusline+=%#warningmsg#
"set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_go_checkers = ['gofmt']
let g:syntastic_enable_signs = 1
highlight SyntasticErrorSign guifg=white guibg=red
Plug 'scrooloose/nerdtree'
"Plug 'ludovicchabant/vim-gutentags'
let g:gutentags_ctags_tagfile = '.tags'
let g:gutentags_file_list_command = 'git ls-files'
let g:gutentags_generate_on_new = 1
"Plug 'majutsushi/tagbar'
Plug 'fatih/vim-go', { 'do': 'GoUpdateBinaries', 'for': 'go' }
Plug 'cespare/vim-toml', { 'for': 'toml' }
let g:deoplete#enable_at_startup = 1
call plug#end()
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" unicode symbols
" let g:airline_left_sep = '▶'
" let g:airline_right_sep = '◀'
let g:airline_symbols.crypt = '🔒'
let g:airline_symbols.linenr = '☰'
" let g:airline_symbols.linenr = '␊'
" let g:airline_symbols.linenr = '␤'
" let g:airline_symbols.linenr = '¶'
" let g:airline_symbols.maxlinenr = ''
" let g:airline_symbols.maxlinenr = '㏑'
" let g:airline_symbols.branch = '⎇'
" let g:airline_symbols.paste = 'ρ'
" let g:airline_symbols.paste = 'Þ'
" let g:airline_symbols.paste = '∥'
" let g:airline_symbols.spell = 'Ꞩ'
" let g:airline_symbols.notexists = 'Ɇ'
" let g:airline_symbols.whitespace = 'Ξ'
fun! InitBex()
let myvar = strftime("%y%m%d.%Hh%M")
let myvar = "set backupext=.". myvar
execute myvar
endfun
map <silent> <Esc> :call InitBex()<CR>
silent call InitBex()
set relativenumber
filetype plugin indent on
syntax on
set modelines=10
noremap <Up> ""
noremap! <Up> <Esc>
noremap <Down> ""
noremap! <Down> <Esc>
noremap <Left> ""
noremap! <Left> <Esc>
noremap <Right> ""
noremap! <Right> <Esc>
vnoremap > ><CR>gv
vnoremap < <<CR>gv
"au BufWinLeave * silent! mkview
"au BufWinEnter * silent! loadview
au BufRead,BufNewFile *.go set filetype=go
"au BufRead,BufNewFile *.coffee set filetype=coffee
let mapleader=","
set ignorecase
set smartcase
set gdefault
set incsearch
set showmatch
set hlsearch
nnoremap <leader><space> :noh<cr>
set ignorecase
set smartcase
set gdefault
set incsearch
set showmatch
set hlsearch
set autoindent
"set signcolumn=yes
set backspace=indent,eol,start
set backup
set backupdir=~/.vim/backup//
set cmdheight=3
"set clipboard=unnamed
set directory=~/.vim/swap//
set encoding=utf-8
set expandtab
set fileencodings=utf-8,iso-8859-15
set guifont=Monaco:h16
set hidden
set ignorecase
set laststatus=2
set modeline
set nobomb
set nocompatible
set shiftwidth=4
set showcmd
set smartcase
set smarttab
set softtabstop=4
set spellfile=~/.vim/spellfile.utf-8.add
set spelllang=en
set tabstop=4
set termencoding=utf-8
set ttyfast
set tw=76
set undodir=~/.vim/undo//
set undofile
set wildignore+=*.pyc
set writebackup
setglobal fileencoding=utf-8
autocmd FileType make setlocal noexpandtab
autocmd FileType markdown setlocal spell
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
autocmd BufNewFile,BufRead *.json set ft=javascript
"inoremap jj <Esc>
map N Nzz
map n nzz
"map <s-tab> <c-w><c-w>
colorscheme koehler
hi CursorLine term=none cterm=none ctermbg=none
set t_Co=256
set foldmethod=indent
set foldminlines=5
set nofoldenable "dont fold by default
set foldlevel=1 "this is just what i use
"nnoremap <silent> <Space> @=(foldlevel('.')?'za':'l')<CR>
"vnoremap <Space> zf
"nnoremap <silent> <Tab> :bn<CR>
"nnoremap <silent> <Backspace> :bp<CR>
"nnoremap <silent> <Leader><Enter> :ls<CR>
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
let python_no_builtin_highlight = 1
let python_no_doctest_code_highlight = 1
let python_no_doctest_highlight = 1
let python_no_exception_highlight = 1
let python_no_number_highlight = 1
let python_space_error_highlight = 1
let g:flake8_show_in_gutter=1 " show

87
root/home/user/.zshrc Normal file
View File

@@ -0,0 +1,87 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/user/.zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
HIST_STAMPS="yyyy-mm-dd"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git git-prompt zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
if [[ -e ~/.nix-profile/etc/profile.d/nix.sh ]]; then
source ~/.nix-profile/etc/profile.d/nix.sh
fi
for FN in ~/.local/profile.d/*.sh ; do
source "$FN"
done
if [[ -d ~/.paths/sneak-sync/bashrc.d ]]; then
for FN in ~/.paths/sneak-sync/bashrc.d/*.sh ; do
source "$FN"
done
fi

16
root/root/.toprc Normal file
View File

@@ -0,0 +1,16 @@
top's Config File (Linux processes with windows)
Id:i, Mode_altscr=0, Mode_irixps=1, Delay_time=1.0, Curwin=0
Def fieldscur=¥¨³´»½ÀÄ·º¹Å&')*+,-./012568<>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=162740, sortindx=18, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=1, msgsclr=1, headclr=3, taskclr=1
Job fieldscur=¥¦¹·º(³´Ä»½@<§Å)*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=195508, sortindx=0, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=6, msgsclr=6, headclr=7, taskclr=6
Mem fieldscur=¥º»<½¾¿ÀÁMBNÃD34·Å&'()*+,-./0125689FGHIJKLOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=195508, sortindx=21, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=5, msgsclr=5, headclr=4, taskclr=5
Usr fieldscur=¥¦§¨ª°¹·ºÄÅ)+,-./1234568;<=>?@ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=195380, sortindx=3, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=3, msgsclr=3, headclr=2, taskclr=3
Fixed_widest=0, Summ_mscale=0, Task_mscale=0, Zero_suppress=0

View File

@@ -1,110 +0,0 @@
apt-transport-https
apt-utils
aspell
aspell-en
automake
bash-completion
bc
bind9-host
bonnie++
build-essential
byobu
ca-certificates
cmake
command-not-found
curl
daemontools
debmirror
default-jre
diffstat
dnsutils
docker.io
dos2unix
editorconfig
ffmpeg
fonts-indic
fonts-ipafont-gothic
fonts-ipafont-mincho
fortune
git
gnupg2
gnupg-agent
golang-go
host
imagemagick
iputils-ping
irssi
jq
lcov
ldap-auth-client
ldap-utils
libasound2
libatk1.0-0
libboost-all-dev
libdb++-dev
libgconf-2-4
libgtk-3-0
libjpeg-dev
libnss3
libnss-mdns
libpng-dev
libssl-dev
libtool
libxcursor1
libxml2
libxml2-dev
libxslt1-dev
locales
lsof
mailutils
make
man
man-db
mercurial
mosh
mutt
netcat-openbsd
nmap
nscd
openssh-server
pandoc
pass
pbzip2
pinentry-curses
pkg-config
psmisc
pv
pwgen
python3
python3-dev
python3-pip
rbenv
rsync
rsyslog
rsyslog-gnutls
rsyslog-relp
runit
screen
snmp
snmpd
socat
software-properties-common
strace
sudo
tcpdump
telnet
texlive-latex-base
tmux
tree
ttf-wqy-microhei
ttf-wqy-zenhei
vagrant
vim
vim-gtk
wamerican-insane
wget
xterm
zfsutils-linux
zip
zsh

View File

@@ -1,7 +0,0 @@
#!/bin/bash
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
cd "$TD"
apt install -y $(cat packages.txt)