diff --git a/README.md b/README.md index d119f5a..5bc5af1 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,9 @@ INSTALL_PKGS: Install common packages, if on a Debian-like system. (Defaults to opposite of $MINIMAL.) SAVE: Save the install options to ${BASEDIR}/installed-prefs ``` +### TODO ### + +[ ] Re-do the installation of packages. + [ ] Make manual installation of sets easy/possible. + [ ] Make missing packages not cause a full set failure. + [X] Allow comments and blank lines. diff --git a/dotfiles/Xresources b/dotfiles/Xresources index f62fd64..04c1e8b 100644 --- a/dotfiles/Xresources +++ b/dotfiles/Xresources @@ -5,9 +5,11 @@ Xcursor.size: 16 !!! Xft.dpi: 96 Xft.antialias: false +Xft.lcdfilter: lcddefault Xft.rgba: rgb Xft.hinting: true Xft.hintstyle: hintslight +Xft.autohint: 0 !!! ! Solarized urxvt diff --git a/dotfiles/aliases b/dotfiles/aliases old mode 100644 new mode 100755 index 76c7842..17d8fbb --- a/dotfiles/aliases +++ b/dotfiles/aliases @@ -30,3 +30,6 @@ alias chrome-for-burp="/usr/bin/google-chrome --ignore-certificate-errors --user # Useful directory utilities alias dircount="for d in * ; do find \$d -type d | wc -l | tr -d '\n' ; echo ' ' \$d ; done | sort -n" + +# Drop caches for swap issues +alias drop_caches="echo 3 | sudo /usr/bin/tee /proc/sys/vm/drop_caches" diff --git a/dotfiles/bashrc b/dotfiles/bashrc old mode 100644 new mode 100755 diff --git a/dotfiles/config/i3/config b/dotfiles/config/i3/config index e9bb7db..891809c 100644 --- a/dotfiles/config/i3/config +++ b/dotfiles/config/i3/config @@ -172,6 +172,8 @@ bindsym --release $alt+Sys_Req exec --no-startup-id \ exec --no-startup-id \ (which xss-lock >/dev/null || /usr/bin/cinnamon-settings-daemon) & exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11,secrets +# Make GTK fonts look great again +exec --no-startup-id gnome-settings-daemon exec --no-startup-id (sleep 2; nm-applet) & exec --no-startup-id xset r rate 200 20 exec --no-startup-id ~/bin/autostart.py diff --git a/dotfiles/env b/dotfiles/env old mode 100644 new mode 100755 index eeb4b84..439a17b --- a/dotfiles/env +++ b/dotfiles/env @@ -22,4 +22,7 @@ fi # For virtualenvwrapper export WORKON_HOME=$HOME/.virtualenvs +# GPG full key id +export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B + if [[ -e $HOME/.localenv ]] ; then source $HOME/.localenv ; fi diff --git a/dotfiles/gnupg/gpg-agent.conf b/dotfiles/gnupg/gpg-agent.conf index ab47375..c318aa7 100644 --- a/dotfiles/gnupg/gpg-agent.conf +++ b/dotfiles/gnupg/gpg-agent.conf @@ -1,5 +1,5 @@ -use-standard-socket default-cache-ttl 7200 default-cache-ttl-ssh 7200 max-cache-ttl 86400 max-cache-ttl-ssh 86400 +enable-ssh-support diff --git a/dotfiles/profile b/dotfiles/profile old mode 100644 new mode 100755 diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 023440b..2063ea7 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -19,6 +19,8 @@ if filereadable(glob("~/.vim/bundle/Vundle.vim/README.md")) Plugin 'vimoutliner/vimoutliner' Plugin 'PotatoesMaster/i3-vim-syntax' Plugin 'Matt-Deacalion/vim-systemd-syntax' + Plugin 'fatih/vim-go' + Plugin 'vhda/verilog_systemverilog.vim' call vundle#end() endif diff --git a/dotfiles/weechat/alias.conf b/dotfiles/weechat/alias.conf index e5f00a4..069fc02 100644 --- a/dotfiles/weechat/alias.conf +++ b/dotfiles/weechat/alias.conf @@ -1,5 +1,5 @@ # -# alias.conf -- weechat v1.0.1 +# weechat -- alias.conf # [cmd] diff --git a/dotfiles/weechat/aspell.conf b/dotfiles/weechat/aspell.conf index aa0bd00..c3d12dc 100644 --- a/dotfiles/weechat/aspell.conf +++ b/dotfiles/weechat/aspell.conf @@ -1,5 +1,5 @@ # -# aspell.conf -- weechat v1.0.1 +# weechat -- aspell.conf # [color] diff --git a/dotfiles/weechat/charset.conf b/dotfiles/weechat/charset.conf index aadbdae..99a90d5 100644 --- a/dotfiles/weechat/charset.conf +++ b/dotfiles/weechat/charset.conf @@ -1,5 +1,5 @@ # -# charset.conf -- weechat v1.0.1 +# weechat -- charset.conf # [default] diff --git a/dotfiles/weechat/exec.conf b/dotfiles/weechat/exec.conf index 0f713aa..39f1929 100644 --- a/dotfiles/weechat/exec.conf +++ b/dotfiles/weechat/exec.conf @@ -1,5 +1,5 @@ # -# exec.conf -- weechat v1.0.1 +# weechat -- exec.conf # [command] diff --git a/dotfiles/weechat/irc.conf b/dotfiles/weechat/irc.conf index 673b61a..18ecd46 100644 --- a/dotfiles/weechat/irc.conf +++ b/dotfiles/weechat/irc.conf @@ -1,8 +1,10 @@ # -# irc.conf -- weechat v1.0.1 +# weechat -- irc.conf # [look] +buffer_open_before_autojoin = on +buffer_open_before_join = off buffer_switch_autojoin = on buffer_switch_join = on color_nicks_in_names = off @@ -25,7 +27,6 @@ highlight_channel = "$nick" highlight_pv = "$nick" highlight_server = "$nick" highlight_tags_restrict = "irc_privmsg,irc_notice" -item_away_message = on item_channel_modes_hide_args = "k" item_display_server = buffer_plugin item_nick_modes = on @@ -34,9 +35,6 @@ join_auto_add_chantype = off msgbuffer_fallback = current new_channel_position = none new_pv_position = none -nick_color_force = "" -nick_color_hash = sum -nick_color_stop_chars = "_|[" nick_completion_smart = speakers nick_mode = prefix nick_mode_empty = off @@ -58,11 +56,11 @@ smart_filter_join_unmask = 30 smart_filter_mode = "+" smart_filter_nick = on smart_filter_quit = on +temporary_servers = off topic_strip_colors = off [color] input_nick = lightcyan -item_away = yellow item_channel_modes = default item_lag_counting = default item_lag_finished = yellow @@ -73,14 +71,15 @@ mirc_remap = "1,-1:darkgray" nick_prefixes = "q:lightred;a:lightcyan;o:lightgreen;h:lightmagenta;v:yellow;*:lightblue" notice = green reason_quit = default +topic_current = default topic_new = white topic_old = default [network] -alternate_nick = on autoreconnect_delay_growing = 2 autoreconnect_delay_max = 600 ban_mask_default = "*!$ident@$host" +channel_encode = off colors_receive = on colors_send = on lag_check = 60 @@ -90,6 +89,7 @@ lag_reconnect = 0 lag_refresh_interval = 1 notify_check_ison = 1 notify_check_whois = 5 +sasl_fail_unavailable = on send_unknown_commands = off whois_double_nick = off @@ -115,16 +115,19 @@ capabilities = "" command = "" command_delay = 0 connection_timeout = 60 -default_msg_kick = "" -default_msg_part = "gg" -default_msg_quit = "gg! I'm out." ipv6 = on local_hostname = "" +msg_kick = "" +msg_part = "WeeChat ${info:version}" +msg_quit = "WeeChat ${info:version}" nicks = "Matir,Matir~,Matir[]" +nicks_alternate = on notify = "" password = "" proxy = "" realname = "" +sasl_fail = continue +sasl_key = "" sasl_mechanism = plain sasl_password = "" sasl_timeout = 15 @@ -152,11 +155,14 @@ freenode.capabilities freenode.sasl_mechanism freenode.sasl_username freenode.sasl_password +freenode.sasl_key freenode.sasl_timeout +freenode.sasl_fail freenode.autoconnect = on freenode.autoreconnect freenode.autoreconnect_delay freenode.nicks = "Matir,Matir~" +freenode.nicks_alternate freenode.username freenode.realname freenode.local_hostname @@ -170,9 +176,9 @@ freenode.anti_flood_prio_high freenode.anti_flood_prio_low freenode.away_check freenode.away_check_max_nicks -freenode.default_msg_kick -freenode.default_msg_part -freenode.default_msg_quit +freenode.msg_kick +freenode.msg_part +freenode.msg_quit freenode.notify hak5.addresses = "irc.hak5.org/6697" hak5.proxy @@ -188,17 +194,20 @@ hak5.capabilities hak5.sasl_mechanism hak5.sasl_username hak5.sasl_password +hak5.sasl_key hak5.sasl_timeout +hak5.sasl_fail hak5.autoconnect = on hak5.autoreconnect hak5.autoreconnect_delay hak5.nicks +hak5.nicks_alternate hak5.username hak5.realname hak5.local_hostname hak5.command hak5.command_delay -hak5.autojoin = "#hak5,#pineapple,#ducky,#SDR,#lanturtle" +hak5.autojoin = "#hak5,#pineapple,#ducky,#SDR,#lanturtle,#bashbunny" hak5.autorejoin hak5.autorejoin_delay hak5.connection_timeout @@ -206,9 +215,9 @@ hak5.anti_flood_prio_high hak5.anti_flood_prio_low hak5.away_check hak5.away_check_max_nicks -hak5.default_msg_kick -hak5.default_msg_part -hak5.default_msg_quit +hak5.msg_kick +hak5.msg_part +hak5.msg_quit hak5.notify rpisec.addresses = "irc.rpis.ec/6697" rpisec.proxy @@ -224,11 +233,14 @@ rpisec.capabilities rpisec.sasl_mechanism rpisec.sasl_username rpisec.sasl_password +rpisec.sasl_key rpisec.sasl_timeout +rpisec.sasl_fail rpisec.autoconnect = on rpisec.autoreconnect rpisec.autoreconnect_delay rpisec.nicks +rpisec.nicks_alternate rpisec.username rpisec.realname rpisec.local_hostname @@ -242,9 +254,9 @@ rpisec.anti_flood_prio_high rpisec.anti_flood_prio_low rpisec.away_check rpisec.away_check_max_nicks -rpisec.default_msg_kick -rpisec.default_msg_part -rpisec.default_msg_quit +rpisec.msg_kick +rpisec.msg_part +rpisec.msg_quit rpisec.notify overthewire.addresses = "ircs.overthewire.org/6697" overthewire.proxy @@ -260,11 +272,14 @@ overthewire.capabilities overthewire.sasl_mechanism overthewire.sasl_username overthewire.sasl_password +overthewire.sasl_key overthewire.sasl_timeout +overthewire.sasl_fail overthewire.autoconnect = on overthewire.autoreconnect overthewire.autoreconnect_delay overthewire.nicks +overthewire.nicks_alternate overthewire.username overthewire.realname overthewire.local_hostname @@ -278,7 +293,85 @@ overthewire.anti_flood_prio_high overthewire.anti_flood_prio_low overthewire.away_check overthewire.away_check_max_nicks -overthewire.default_msg_kick -overthewire.default_msg_part -overthewire.default_msg_quit +overthewire.msg_kick +overthewire.msg_part +overthewire.msg_quit overthewire.notify +hackint.addresses = "irc.hackint.org/9999" +hackint.proxy +hackint.ipv6 +hackint.ssl = on +hackint.ssl_cert +hackint.ssl_priorities +hackint.ssl_dhkey_size +hackint.ssl_fingerprint +hackint.ssl_verify = on +hackint.password +hackint.capabilities +hackint.sasl_mechanism +hackint.sasl_username +hackint.sasl_password +hackint.sasl_key +hackint.sasl_timeout +hackint.sasl_fail +hackint.autoconnect = on +hackint.autoreconnect +hackint.autoreconnect_delay +hackint.nicks +hackint.nicks_alternate +hackint.username +hackint.realname +hackint.local_hostname +hackint.command +hackint.command_delay +hackint.autojoin +hackint.autorejoin +hackint.autorejoin_delay +hackint.connection_timeout +hackint.anti_flood_prio_high +hackint.anti_flood_prio_low +hackint.away_check +hackint.away_check_max_nicks +hackint.msg_kick +hackint.msg_part +hackint.msg_quit +hackint.notify +afternet.addresses = "irc.afternet.org/6697" +afternet.proxy +afternet.ipv6 +afternet.ssl = on +afternet.ssl_cert +afternet.ssl_priorities +afternet.ssl_dhkey_size +afternet.ssl_fingerprint +afternet.ssl_verify = on +afternet.password +afternet.capabilities +afternet.sasl_mechanism +afternet.sasl_username +afternet.sasl_password +afternet.sasl_key +afternet.sasl_timeout +afternet.sasl_fail +afternet.autoconnect = on +afternet.autoreconnect +afternet.autoreconnect_delay +afternet.nicks +afternet.nicks_alternate +afternet.username +afternet.realname +afternet.local_hostname +afternet.command +afternet.command_delay +afternet.autojoin = "#eevblog" +afternet.autorejoin +afternet.autorejoin_delay +afternet.connection_timeout +afternet.anti_flood_prio_high +afternet.anti_flood_prio_low +afternet.away_check +afternet.away_check_max_nicks +afternet.msg_kick +afternet.msg_part +afternet.msg_quit +afternet.notify diff --git a/dotfiles/weechat/letsencrypt.sh b/dotfiles/weechat/letsencrypt.sh new file mode 100755 index 0000000..c381e63 --- /dev/null +++ b/dotfiles/weechat/letsencrypt.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Update the weechat SSL key. Should be called from cron via sudo. + +eval WEEDIR="$(printf "~%q/.weechat/" "${SUDO_USER}")" +LIVEKEY="${WEEDIR}/ssl/relay.pem" + +certbot renew -q +cat /etc/letsencrypt/live/$(hostname -f)/{privkey,fullchain}.pem > \ + ${LIVEKEY} +chown ${SUDO_USER}:$(id -gn ${SUDO_USER}) ${LIVEKEY} +for fifo in ${WEEDIR}/weechat_fifo* ; do + echo '*/relay sslcertkey' > ${fifo} +done diff --git a/dotfiles/weechat/logger.conf b/dotfiles/weechat/logger.conf index b2369db..89fed53 100644 --- a/dotfiles/weechat/logger.conf +++ b/dotfiles/weechat/logger.conf @@ -1,5 +1,5 @@ # -# logger.conf -- weechat v1.0.1 +# weechat -- logger.conf # [look] diff --git a/dotfiles/weechat/plugins.conf b/dotfiles/weechat/plugins.conf index a744a5bb..8bb36fd 100644 --- a/dotfiles/weechat/plugins.conf +++ b/dotfiles/weechat/plugins.conf @@ -1,10 +1,11 @@ # -# plugins.conf -- weechat v1.0.1 +# weechat -- plugins.conf # [var] fifo.fifo = "on" guile.check_license = "off" +javascript.check_license = "off" lua.check_license = "off" perl.check_license = "off" python.check_license = "off" diff --git a/dotfiles/weechat/relay.conf b/dotfiles/weechat/relay.conf index dd180d7..296b06b 100644 --- a/dotfiles/weechat/relay.conf +++ b/dotfiles/weechat/relay.conf @@ -1,5 +1,5 @@ # -# relay.conf -- weechat v1.0.1 +# weechat -- relay.conf # [look] @@ -18,6 +18,7 @@ text_bg = default text_selected = white [network] +allow_empty_password = off allowed_ips = "" bind_address = "" clients_purge_delay = 0 @@ -26,12 +27,14 @@ ipv6 = on max_clients = 5 password = "${sec.data.relay_password}" ssl_cert_key = "%h/ssl/relay.pem" +ssl_priorities = "NORMAL:-VERS-SSL3.0" websocket_allowed_origins = "" [irc] backlog_max_minutes = 1440 backlog_max_number = 256 backlog_since_last_disconnect = on +backlog_since_last_message = off backlog_tags = "irc_privmsg" backlog_time_format = "[%H:%M] " diff --git a/dotfiles/weechat/script.conf b/dotfiles/weechat/script.conf index 6e09f58..e1577d4 100644 --- a/dotfiles/weechat/script.conf +++ b/dotfiles/weechat/script.conf @@ -1,5 +1,5 @@ # -# script.conf -- weechat v1.0.1 +# weechat -- script.conf # [look] @@ -43,6 +43,8 @@ text_version_selected = lightmagenta [scripts] autoload = on cache_expire = 1440 -dir = "%h/script" +download_timeout = 30 hold = "" +path = "%h/script" url = "http://weechat.org/files/plugins.xml.gz" +url_force_https = on diff --git a/dotfiles/weechat/sec.conf b/dotfiles/weechat/sec.conf index 856bf9e..f89d2ac 100644 --- a/dotfiles/weechat/sec.conf +++ b/dotfiles/weechat/sec.conf @@ -1,5 +1,5 @@ # -# sec.conf -- weechat v1.0.1 +# weechat -- sec.conf # [crypt] @@ -10,4 +10,4 @@ salt = on [data] __passphrase__ = on -relay_password = "F72F34E668B7CE288A36F20629885B9A985EAE9ED04E80C37BF6176FAF8404EE3E0D5D22A6C8E7681ACC0899FB888436AF200183A27591" +relay_password = "D1FD30C08951B1A5BCBBB7EE6AAFB6AF9B86017B353182A1CA8826D5A98EB88E7E723591C544FC41A6913EA67E8764E50BDD8A5AD3D0A0" diff --git a/dotfiles/weechat/trigger.conf b/dotfiles/weechat/trigger.conf index 0fdd9d8..a090b43 100644 --- a/dotfiles/weechat/trigger.conf +++ b/dotfiles/weechat/trigger.conf @@ -1,5 +1,5 @@ # -# trigger.conf -- weechat v1.0.1 +# weechat -- trigger.conf # [look] @@ -9,6 +9,7 @@ monitor_strip_colors = off [color] flag_command = lightgreen flag_conditions = yellow +flag_post_action = lightblue flag_regex = lightcyan flag_return_code = lightmagenta regex = white @@ -22,6 +23,7 @@ beep.command = "/print -beep" beep.conditions = "${tg_highlight} || ${tg_msg_pv}" beep.enabled = on beep.hook = print +beep.post_action = none beep.regex = "" beep.return_code = ok cmd_pass.arguments = "5000|input_text_display;5000|history_add;5000|irc_command_auth" @@ -29,6 +31,7 @@ cmd_pass.command = "" cmd_pass.conditions = "" cmd_pass.enabled = on cmd_pass.hook = modifier +cmd_pass.post_action = none cmd_pass.regex = "==^((/(msg|quote) +nickserv +(id|identify|register|ghost +[^ ]+|release +[^ ]+|regain +[^ ]+) +)|/oper +[^ ]+ +|/quote +pass +|/set +[^ ]*password[^ ]* +|/secure +(passphrase|decrypt|set +[^ ]+) +)(.*)==$1$.*+" cmd_pass.return_code = ok msg_auth.arguments = "5000|irc_message_auth" @@ -36,6 +39,7 @@ msg_auth.command = "" msg_auth.conditions = "" msg_auth.enabled = on msg_auth.hook = modifier +msg_auth.post_action = none msg_auth.regex = "==^(.*(id|identify|register|ghost +[^ ]+|release +[^ ]+) +)(.*)==$1$.*+" msg_auth.return_code = ok server_pass.arguments = "5000|input_text_display;5000|history_add" @@ -43,5 +47,6 @@ server_pass.command = "" server_pass.conditions = "" server_pass.enabled = on server_pass.hook = modifier +server_pass.post_action = none server_pass.regex = "==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==$1$.*4$5" server_pass.return_code = ok diff --git a/dotfiles/weechat/weechat.conf b/dotfiles/weechat/weechat.conf index 6e8bdd4..bdef861 100644 --- a/dotfiles/weechat/weechat.conf +++ b/dotfiles/weechat/weechat.conf @@ -1,5 +1,5 @@ # -# weechat.conf -- weechat v1.0.1 +# weechat -- weechat.conf # [debug] @@ -38,7 +38,9 @@ color_nick_offline = off color_pairs_auto_reset = 5 color_real_white = off command_chars = "" +command_incomplete = off confirm_quit = off +confirm_upgrade = off day_change = on day_change_message_1date = "-- %a, %d %b %Y --" day_change_message_2dates = "-- %%a, %%d %%b %%Y (%a, %d %b %Y) --" @@ -65,17 +67,24 @@ input_cursor_scroll = 20 input_share = none input_share_overwrite = off input_undo_max = 32 +item_away_message = on item_buffer_filter = "*" item_buffer_zoom = "!" +item_mouse_status = "M" item_time_format = "%H:%M" jump_current_to_previous_buffer = on jump_previous_buffer_when_closing = on jump_smart_back_to_buffer = on key_bind_safe = on +key_grab_delay = 800 mouse = off mouse_timer_delay = 100 +nick_color_force = "" +nick_color_hash = djb2 +nick_color_stop_chars = "_|[" nick_prefix = "" nick_suffix = "" +paste_auto_add_newline = on paste_bracketed = on paste_bracketed_timer_delay = 10 paste_max_lines = 1 @@ -95,6 +104,9 @@ prefix_network = "--" prefix_quit = "<--" prefix_same_nick = "" prefix_suffix = "|" +quote_nick_prefix = "<" +quote_nick_suffix = ">" +quote_time_format = "%H:%M:%S" read_marker = line read_marker_always_show = off read_marker_string = "- " @@ -112,6 +124,8 @@ window_auto_zoom = off window_separator_horizontal = on window_separator_vertical = on window_title = "irc" +word_chars_highlight = "!\u00A0,-,_,|,alnum" +word_chars_input = "!\u00A0,-,_,|,alnum" [palette] @@ -155,13 +169,14 @@ chat_text_found_bg = lightmagenta chat_time = default chat_time_delimiters = brown chat_value = cyan +chat_value_null = blue emphasized = yellow emphasized_bg = magenta input_actions = lightgreen input_text_not_found = red +item_away = yellow nicklist_away = cyan nicklist_group = green -nicklist_offline = blue separator = blue status_count_highlight = magenta status_count_msg = brown @@ -173,6 +188,7 @@ status_data_other = default status_data_private = lightgreen status_filter = green status_more = yellow +status_mouse = green status_name = white status_name_ssl = lightgreen status_nicklist_count = default @@ -181,6 +197,7 @@ status_time = default [completion] base_word_until_cursor = on +command_inline = on default_template = "%(nicks)|%(irc_channels)" nick_add_space = on nick_completer = ":" @@ -203,7 +220,7 @@ max_visited_buffers = 50 [network] connection_timeout = 60 -gnutls_ca_file = "/etc/ssl/certs/ca-certificates.crt" +gnutls_ca_file = "~/.weechat/certs/ca-certificates.crt" gnutls_handshake_timeout = 30 proxy_curl = "" diff --git a/dotfiles/weechat/xfer.conf b/dotfiles/weechat/xfer.conf index 6e78f2a..39ac5bd 100644 --- a/dotfiles/weechat/xfer.conf +++ b/dotfiles/weechat/xfer.conf @@ -1,5 +1,5 @@ # -# xfer.conf -- weechat v1.0.1 +# weechat -- xfer.conf # [look] diff --git a/dotfiles/zsh_custom/plugins/gpg-agent/gpg-agent.plugin.zsh b/dotfiles/zsh_custom/plugins/gpg-agent/gpg-agent.plugin.zsh index 6e467e8..52f23e6 100644 --- a/dotfiles/zsh_custom/plugins/gpg-agent/gpg-agent.plugin.zsh +++ b/dotfiles/zsh_custom/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -1,4 +1,4 @@ -# Custom agent to handle gpg-agent 2.1 +# Custom plugin to handle gpg-agent 2.1 local GPG_ENV=$HOME/.gnupg/gpg-agent.env @@ -16,6 +16,17 @@ function start_agent_withssh { export SSH_AGENT_PID } +if [ -z "${GPG_AGENT_INFO}" ] ; then + if which gpgconf >/dev/null 2>&1 ; then + GPG_AGENT_INFO=$(gpgconf --list-dirs agent-socket) + export GPG_AGENT_INFO + if [ -z "${SSH_AUTH_SOCK}" ] ; then + SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + export SSH_AUTH_SOCK + fi + fi +fi + # check if another agent is running if ! gpg-connect-agent --agent-program /dev/null --quiet /bye > /dev/null 2> /dev/null; then # source settings of old agent, if applicable diff --git a/dotfiles/zshenv b/dotfiles/zshenv old mode 100644 new mode 100755 diff --git a/dotfiles/zshrc b/dotfiles/zshrc old mode 100644 new mode 100755 index 0799dca..243edc6 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -29,7 +29,7 @@ if [ -d $HOME/.oh-my-zsh ] ; then ZSH=$HOME/.oh-my-zsh ZSH_THEME="matir" ZSH_CUSTOM="$HOME/.zsh_custom" - plugins=(encode64 gpg-agent pep8 pip python tmux urltools extract sudo virsh virtualenv jekyll metasploit gcloud) + plugins=(encode64 gpg-agent pep8 pip python tmux urltools extract sudo virsh virtualenv jekyll metasploit gcloud safe-paste) test -f /usr/share/virtualenvwrapper/virtualenvwrapper.sh && plugins+=(virtualenvwrapper) source $ZSH/oh-my-zsh.sh unset ZSH_THEME diff --git a/install.sh b/install.sh index b8254f9..cc30a80 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash -set nounset -set errexit +set -o nounset +set -o errexit function prerequisites { if which zsh > /dev/null 2>&1 ; then @@ -55,12 +55,17 @@ function install_git { if ! which git > /dev/null ; then return 1 fi - local REPO="${1}" - local DESTDIR="${2}" + local REPO="${*: -2:1}" + local DESTDIR="${*: -1:1}" + set -- ${@:1:$(($#-2))} if [[ -d ${DESTDIR}/.git ]] ; then ( cd ${DESTDIR} ; git pull -q ) else - git clone ${REPO} ${DESTDIR} + if [[ ${MINIMAL} -eq 1 ]] ; then + git clone --depth 1 $* ${REPO} ${DESTDIR} + else + git clone $* ${REPO} ${DESTDIR} + fi fi } @@ -78,7 +83,7 @@ function install_pwndbg { if ! which gdb > /dev/null 2>&1 ; then return 1 fi - install_git https://github.com/pwndbg/pwndbg.git $HOME/.pwndbg + install_git -b stable https://github.com/pwndbg/pwndbg.git $HOME/.pwndbg mkdir -p $HOME/.pwndbg/vendor local PYVER=$(gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))') local PYTHON=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)') @@ -91,8 +96,6 @@ function install_pwndbg { } function postinstall { - install_pwndbg - # Install Vundle plugins if [[ -d $HOME/.vim/bundle/Vundle.vim ]] ; then vim +VundleInstall +qall @@ -200,8 +203,25 @@ function run_as_root { function install_pkg_set { local pkg_file=${BASEDIR}/${1} + local pkg_list="" if [[ ! -f ${pkg_file} ]] ; then return 0 ; fi - run_as_root apt-get install -qqy `cat ${pkg_file}` + while read line ; do + if [[ ${line:0:1} == '#' ]] ; then + continue + fi + if [[ -z ${line} ]] ; then + continue + fi + if apt-cache show ${line} >/dev/null 2>&1 ; then + pkg_list="${pkg_list} ${line}" + else + echo "Warning: package ${line} not found." >&2 + fi + done < ${pkg_file} + if [ -n "${pkg_list}" ] ; then + verbose "Installing ${pkg_list}" + run_as_root apt-get install -qqy ${pkg_list} + fi } function install_apt_pkgs { @@ -267,13 +287,32 @@ EOF } function verbose { - (( ${VERBOSE:-0} )) && echo "$@" >&2 + (( ${VERBOSE:-0} )) && echo "$@" >&2 || return 0 +} + +# Operations + +function install_main { + (( $MINIMAL )) || prerequisites + (( $INSTALL_PKGS )) && is_deb_system && install_apt_pkgs + install_dotfile_dir "${BASEDIR}/dotfiles" + test -d "${BASEDIR}/private_dotfiles" && \ + test -d "${BASEDIR}/.git/git-crypt" && \ + install_dotfile_dir "${BASEDIR}/private_dotfiles" + test -d "${BASEDIR}/local_dotfiles" && \ + install_dotfile_dir "${BASEDIR}/local_dotfiles" + install_basic_dir "${BASEDIR}/bin" "${HOME}/bin" + (( $MINIMAL )) || postinstall + (( $INSTALL_KEYS )) && install_keys + save_prefs + cleanup } # Setup variables read_saved_prefs -# Defaults if not passed in or saved +# Defaults if not passed in or saved. +# TODO: use flags instead of environment variables. BASEDIR=${BASEDIR:-$HOME/.skel} MINIMAL=${MINIMAL:-0} INSTALL_KEYS=${INSTALL_KEYS:-1} @@ -289,25 +328,34 @@ if [[ ! -d $BASEDIR ]] ; then fi if which dpkg-query > /dev/null 2>&1 ; then - HAVE_X=`dpkg-query -s xserver-xorg 2>/dev/null | grep -c 'Status.*installed'` + HAVE_X=$(dpkg-query -s xserver-xorg 2>/dev/null | \ + grep -c 'Status.*installed' \ + || true) else HAVE_X=0 fi -IS_KALI=`grep -ci kali /etc/os-release 2>/dev/null` -ARCH=`uname -m` +IS_KALI=$(grep -ci kali /etc/os-release 2>/dev/null || true) +ARCH=$(uname -m) +OPERATION=${1:-install} -(( $MINIMAL )) || prerequisites -(( $INSTALL_PKGS )) && is_deb_system && install_apt_pkgs -install_dotfile_dir "${BASEDIR}/dotfiles" -test -d "${BASEDIR}/private_dotfiles" && \ - test -d "${BASEDIR}/.git/git-crypt" && \ - install_dotfile_dir "${BASEDIR}/private_dotfiles" -test -d "${BASEDIR}/local_dotfiles" && \ - install_dotfile_dir "${BASEDIR}/local_dotfiles" -install_basic_dir "${BASEDIR}/bin" "${HOME}/bin" -(( $MINIMAL )) || postinstall -(( $INSTALL_KEYS )) && install_keys -save_prefs -cleanup +case $OPERATION in + install) + install_main + ;; + package*) + if [ ${2:-default} != default ] ; then + install_pkg_set packages.${2} + else + install_pkg_set packages + fi + ;; + pwndbg) + install_pwndbg + ;; + *) + echo "Unknown operation $OPERATION." >/dev/stderr + exit 1 + ;; +esac diff --git a/keys/ssh/5dea789b_subkey.pub b/keys/ssh/5dea789b_subkey.pub new file mode 100644 index 0000000..2652993 --- /dev/null +++ b/keys/ssh/5dea789b_subkey.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYQOAB5bJ9DjMXyY67GEI99kK1LG8XF+cWJ4md52rPnOeJd0da7l26bn9NtXCma6DP5gZQArfxHsPh7I4SbYJRYxTCCCE/Jsd8mLB22DcoeY+MqPA2g71j3KrYsvuJC++9GHK2Xc7ZRmhAugEmC/NAdtORBVhtBSAUgyCmUczKHoCAqHmq8j54En8kRYjbvlHPpDsNoRuhcH5uDGBIVkbV7UtBl2oUlRNVw7grs6XS7cPU2zCQSxcrRRuAfV4hmGG2eKaPpieNg0MAAbR0G5ssWW3IuYwd1ys5wA0YQuWUhxadUuYc46/cqyyoVIFlfjxCVTX+2w3900SDPOF/YrOwctAb23+78WN6GPnAmmS3zcmXTGsJiw/mmyBlqYI/JdSgrgI+COlcP0rlF/uklzEywfD91m1lno1u2IApdAumZWHR8aFnpHQXfI6rWc1o/V+RBpz5Xe6D2h9CPT3AE303BV09HGmidb0t6bCKoabTDwvE+KojIcbKBji6g8V6KTM= diff --git a/keys/ssh/trusted/5dea789b_subkey.pub b/keys/ssh/trusted/5dea789b_subkey.pub new file mode 120000 index 0000000..38fc4fb --- /dev/null +++ b/keys/ssh/trusted/5dea789b_subkey.pub @@ -0,0 +1 @@ +../5dea789b_subkey.pub \ No newline at end of file diff --git a/packages.HHV b/packages.HHV new file mode 100644 index 0000000..910b9f1 --- /dev/null +++ b/packages.HHV @@ -0,0 +1,350 @@ +# Kali packages +kali-linux-sdr +kali-linux-rfid + +# Hardware tools +# Electronic schematic and PCB design software +kicad +# Logic analyzer and protocol decoder software suite +sigrok +# GNU C compiler (cross compiler for avr) +gcc-avr +# GNU Debugger for avr +gdb-avr +# software for programming Atmel AVR microcontrollers +avrdude +# tool for searching binary images for embedded files and executable code +binwalk +# free and advanced command line hexadecimal editor +radare2 +# Open on-chip JTAG debug solution for ARM and MIPS systems +openocd +# AVR development board IDE and built-in libraries +arduino +# Program your Arduino from the command line +arduino-mk +# Atmel SAM ARM microcontroller flash programming utility +bossa-cli +# Cypress EZ-USB FX2 (LP) programmer +cycfx2prog +# device firmware update (DFU) based USB programmer for Atmel chips +dfu-programmer +# Device firmware update (DFU) USB programmer +dfu-util +# tool for documenting hardware designs through timing diagrams +drawtiming +# A graphical frontend to the Spice simulator +easyspice +# Emulator and simulator for 8051 microcontrollers +emu8051 +# create and flash firmware files to ESP8266 or ESP32 chips +esptool +# utility to configure SRAM based ALTERA devices +flexloader +# VHDL simulator for Linux +freehdl +# graphical logic circuit simulator +glogic +# GNU Circuit Analysis package +gnucap +# Graphical Intel 8085 simulator, assembler and debugger +gnusim8085 +# Simulator for Microchip's PIC microcontrollers +gpsim +# GNU PIC utilities +gputils +# Graphical user interface for gnucap and ngspice +gspiceui +# VCD (Value Change Dump) file waveform viewer +gtkwave +# waveform viewer eg for spice simulators +gwave +# switch-level simulator +irsim +# interface to NXP LPC Microcontrollers ISP serial interface +lpctools +# debugging tool for MSP430 microcontrollers +mspdebug +# Spice circuit simulator +ngspice +# Microchip PIC serial programmer software +picprog +# tool to decode RFID tag data +rfdump +# In-System Programmer for 8051 MCUs using usbtiny +s51dude +# OBD-II vehicle diagnostic scanner +scantool +# Small Device C Compiler +sdcc +# Micro-controller simulator for SDCC +sdcc-ucsim +# Atmel AVR simulator +simulavr +# MIPS R2000/R3000 emulator +spim +# STM32 chip flashing utility using a serial bootloader +stm32flash + +# fast processor emulator +qemu +# JTAG programmer for various flash parts and boards +urjtag +# Firmware programming tool for the USBprog hardware +usbprog +# Icarus verilog compiler +iverilog + +# Misc tools +# fast, scalable, distributed revision control system +git +# Document (PostScript, PDF) viewer +evince +# terminal multiplexer +tmux +# minimal dumb-terminal emulation program +picocom +# GTK+ base UVC Viewer +guvcview + +# Other potential useful tools: +# c2tool - C2 programming/debugging interface +# libswd - SWD programming/debugging interface +# jrev/FTjrev - Software functionality similar to that of JTAGulator +# Add some offline'd websites? +# buspirate, etc.? + +# SDR tools: +# gnuradio chirp hackrf kalibrate-rtl rtlsdr-scanner gqrx-sdr multimon-ng uhd-host uhd-images libgnuradio-baz gr-osmosdr gr-iqbal + +# Other tools in the "Electronics" section that might be useful +# VLSI CAD Tools +alliance +# Altus Metrum firmware and utilities +altos +# Place and route tool for iCE40 family FPGAs +arachne-pnr +# Chip db files for arachne-pnr +arachne-pnr-chipdb +# Platform files for Arduino to run on ATmega1284P +arduino-mighty-1284p +# Arbitrary Transmission Line Calculator +atlc +# Examples for Arbitrary Transmission Line Calculator +atlc-examples +# use GDB with Atmel AVR debuggers +avarice +# assembler for Atmel AVR microcontrollers +avra +# Programmer for Atmel AVR microcontrollers +avrp +# ABC - A System for Sequential Synthesis and Verification +berkeley-abc +# Atmel SAM ARM microcontroller flash programming GUI +bossa +# Utility to control X10 Firecracker devices for home automation +bottlerocket +# Electronic Design Automation software focused on easy of use and portability +caneda +# Handle CAN (Controller Area Network) descriptions - cmdline utilities +canmatrix-utils +# C Compiler for TI/Chipcon 8051-based RF SOCs +# cc1111 Conflicts with sdcc +# Verilog code coverage analysis tool +covered +# Digital Filter Coefficients Generator (DFCGen) GTK+ +dfcgen-gtk +# read temperature sensors in a 1-Wire net +digitemp +# electrical CAD system +electric +# Identify, read, write, erase, and verify BIOS/ROM/flash chips +flashrom +# Tools to handle the bitstream format of Lattice iCE40 FPGAs +fpga-icestorm +# Chip database files for fpga-icestorm +fpga-icestorm-chipdb +# Easy-to-use electronic design software +fritzing +# Easy-to-use electronic design software (data files) +fritzing-data +# Easy-to-use electronic design software (parts files) +fritzing-parts +# GPL EDA -- Electronics design software (metapackage) +geda +# GPL EDA -- Electronics design software (example designs) +geda-examples +# GPL EDA -- Electronics design software (attribute editor) +geda-gattrib +# GPL EDA -- Electronics design software (netlister) +geda-gnetlist +# GPL EDA -- Electronics design software (schematic editor) +geda-gschem +# GPL EDA -- Electronics design software (symbol checker) +geda-gsymcheck +# GPL EDA -- Electronics design software (symbols library) +geda-symbols +# GPL EDA -- Electronics design software (utilities) +geda-utils +# GPL EDA -- Electronics design software -- gschem -> PCB workflow GUI +geda-xgsch2pcb +# Gerber file viewer for PCB design +gerbv +# Placement for digital VLSI design +graywolf +# Electronic schematic and PCB design software +kicad +# Common files used by kicad +kicad-common +# Kicad help files (German) +kicad-doc-de +# Kicad help files (English) +kicad-doc-en +# Kicad help files (Spanish) +kicad-doc-es +# Kicad help files (French) +kicad-doc-fr +# Kicad help files (Japanese) +kicad-doc-ja +# Kicad help files (Dutch) +kicad-doc-nl +# Control programs for the Per Vices Noctar IQ demodulator board +langford-utils +# GPL EDA -- Electronics design software (data files) +libgeda-common +# GPL EDA -- Electronics design software (library files) +libgeda42 +# utility library for talking to the LEGO Mindstorms NXT brick +libnxt +# tool to generate Smith Charts +linsmith +# Flash programmer for Renesas M16C and R8C microcontrollers +m16c-flash +# VLSI layout tool +magic +# Graphical Integrated Development Environment for 8051 +mcu8051ide +# C compiler for LEGO Mindstorms NXT bricks +nbc +# simulator for the Microchip PIC16C84 microcontroller +nitpic +# Improved firmware for LEGO Mindstorms NXT bricks +nxt-firmware +# Open Lighting Architecture +ola +# shell utilities to talk to an 1-Wire owserver +ow-shell +# tools to monitor or inspect a ow-server link +ow-tools +# Dallas 1-wire support +owfs +# common files used by any of the OWFS programs +owfs-common +# 1-Wire filesystem +owfs-fuse +# FTP daemon providing access to 1-Wire networks +owftpd +# HTTP daemon providing access to 1-Wire networks +owhttpd +# Backend server for 1-Wire control +owserver +# printed circuit board (pcb) design program - meta-package +pcb +# printed circuit board (pcb) design program - common files +pcb-common +# printed circuit board (pcb) design program - GTK+ interface +pcb-gtk +# printed circuit board (pcb) design program - LessTif interface +pcb-lesstif +# printed circuit board (pcb) design program +pcb-rnd +# command-line tool for engraving PCBs using CNCs +pcb2gcode +# interfacing with the Arduino from within Pure Data (Pd) +pd-pduino +# interfacing with your XBee from within Pure Data (Pd) +pd-xbee +# Transitional dummy package for python-pyvisa +pyvisa +# Electric schematic editor +qelectrotech +# symbols needed for qelectrotech +qelectrotech-data +# examples files for qelectrotech +qelectrotech-examples +# Open-Source Digital Synthesis Flow +qflow +# Technology files needed for qflow for osu018 +qflow-tech-osu018 +# Technology files needed for qflow for osu035 +qflow-tech-osu035 +# Technology files needed for qflow for osu050 +qflow-tech-osu050 +# Multi-level, over-the-cell maze router +qrouter +# symbolic analyzer and solver of linear analog circuits +qsapecng +# simulator for Microchip PIC16F84 microcontroller +simulpic +# Utilities for using the Wi-Spy USB spectrum analyzer hardware +spectools +# Simple command-line tool for LEGO Mindstorms NXT +t2n +# Tcl/Tk based digital circuit editor and simulator +tkgate +# Tcl/Tk based digital circuit editor and simulator - data files +tkgate-data +# Micro In-System Programmer for Atmel's AVR MCUs +uisp +# USB HID relay driver +usbrelay +# fast free Verilog simulator +verilator +# tool for engraving PCBs using CNCs +visolate +# Data logger for 1-Wire weather sensors +w1retap +# Data logger for 1-Wire weather sensors (MongoDB plugin) +w1retap-mongo +# Data logger for 1-Wire weather sensors (MySQL plugin) +w1retap-mysql +# Data logger for 1-Wire weather sensors (ODBC plugin) +w1retap-odbc +# Data logger for 1-Wire weather sensors (PostgreSQL plugin) +w1retap-pgsql +# Data logger for 1-Wire weather sensors (SQLite plugin) +w1retap-sqlite +# Draw circuit schematics or almost anything +xcircuit +# Framework for Verilog RTL synthesis +yosys +# Framework for Verilog RTL synthesis (development files) +yosys-dev + +# Other tools in the "Embedded" section that might be useful +# Firmware for USB JTAG programmers +ixo-usb-jtag +# Common include files for the open wince project +# openwince-include Conflicts with urjtag +# allows programming jtag capable devices such as CPUs or FPGAs +# openwince-jtag Conflicts with urjtag +# Tools for flashing Rockchip devices +rkflashtool +# GUI firmware programming tool for the USBprog hardware +usbprog-gui + +# Other cross compilers +gcc-aarch64-linux-gnu +gcc-alpha-linux-gnu +gcc-arm-linux-gnueabi +gcc-arm-linux-gnueabihf +gcc-arm-none-eabi +gcc-h8300-hms +gcc-hppa-linux-gnu +gcc-hppa64-linux-gnu +gcc-m68hc1x +gcc-m68k-linux-gnu +gcc-mips-linux-gnu +gcc-mips64-linux-gnuabi64 +gcc-mips64el-linux-gnuabi64 +gcc-mipsel-linux-gnu diff --git a/packages.cli b/packages.cli index a84aa3e..bad4de3 100644 --- a/packages.cli +++ b/packages.cli @@ -7,6 +7,7 @@ iftop iptraf ipython ipython3 +jq kpartx ldap-utils lvm2 @@ -22,7 +23,6 @@ python-hachoir-urwid python-html5lib python-imaging python-pip -python-pypdf python-scapy python-virtualenv python-yara diff --git a/private_dotfiles/ssh/config b/private_dotfiles/ssh/config index 7d37a0c..e2a6714 100644 Binary files a/private_dotfiles/ssh/config and b/private_dotfiles/ssh/config differ