citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit 8f50c5d1c86bce05d9427fc411b64f58d823f954
parent e4ee1b5bca5226a72d419e91cc5d674a0e32bfde
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 12 Aug 2022 15:24:29 -0700

updates

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Abin/bclip | 2++
Mbin/cols | 2+-
Abin/fuzz-notmuch-gam | 15+++++++++++++++
Abin/fx | 2++
Mbin/nix-build-cache | 4+++-
Abin/notmuch-gam | 6++++++
Mbin/search-files | 2+-
Mdotfiles/.bashrc | 3++-
Mdotfiles/.config/neomutt/neomuttrc | 8+++++---
Mdotfiles/.config/nvim/init.vim | 8++++++++
Mdotfiles/.gitconfig | 2--
Mdotfiles/.mail_aliases | 1+
Mdotfiles/commands | 3++-
Mdotfiles/rssfeeds | 15+++++++++------
Mjb55pkgs/default.nix | 8++++----
Mjb55pkgs/pkgs/hoogle-zen/default.nix | 2+-
Mjb55pkgs/pkgs/sharefile/default.nix | 2+-
Mjb55pkgs/pkgs/x11-rename/default.nix | 2+-
Mnix-config/environment/default.nix | 3++-
Mnix-config/environment/desktop/default.nix | 33++++++++++++++++++---------------
Mnix-config/machines/quiver/default.nix | 4+++-
Mnix-config/misc/imap-notifier/default.nix | 2+-
Mnix-config/nixpkgs/config.nix | 19+++++--------------
Mnix-config/services/desktop/default.nix | 6+++---
24 files changed, 96 insertions(+), 58 deletions(-)

diff --git a/bin/bclip b/bin/bclip @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +bcli -rpcwallet=personal "$@" diff --git a/bin/cols b/bin/cols @@ -1,4 +1,4 @@ #!/usr/bin/env sh -cols=${1:-$(tput cols)} +cols=${1:-73} shift fold -w $cols -s "$@" diff --git a/bin/fuzz-notmuch-gam b/bin/fuzz-notmuch-gam @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +#set -eou pipefail +slug=$(github-project-slug) +if [ slug == "" ]; then + slug="and subject:$slug" +fi +thread=$(notmuch search --format=json from:github $slug and subject:PR and date:month.. | +jq -r '.[] | "\(.timestamp) \(.subject)\t\(.thread)"' | +sort -nr | +datefmt --timeago | +fzf --no-sort -m | +cutt -f2 | +xargs -I{} printf 'thread:{}\n') + +echo "notmuch show $thread | mail-prpatch" diff --git a/bin/fx b/bin/fx @@ -0,0 +1 @@ +findex+ \ No newline at end of file diff --git a/bin/nix-build-cache b/bin/nix-build-cache @@ -3,6 +3,8 @@ printf "building cache of nixpkgs\n" >&2 nix-env -f $NIXPKGS -qaP \* > /tmp/search1 & printf "building cache of haskellPackages\n" >&2 nix-env -f $NIXPKGS -qaPA haskellPackages > /tmp/search2 & +printf "building cache of perlPackages\n" >&2 +nix-env -f $NIXPKGS -qaPA perlPackages > /tmp/search3 & wait -cat /tmp/search1 /tmp/search2 | sort > ~/.nixenv.cache +cat /tmp/search{1,2,3} | sort > ~/.nixenv.cache rm -f /tmp/search1 /tmp/search2 diff --git a/bin/notmuch-gam b/bin/notmuch-gam @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -eou pipefail +cmd=$(fuzz-notmuch-gam) + +$cmd diff --git a/bin/search-files b/bin/search-files @@ -11,4 +11,4 @@ res=$(fzf --bind "change:reload:$RG_PREFIX {q} || true" --ansi --phony --query " file=$(cut -d: -f1 <<<"$res") line=$(cut -d: -f2 <<<"$res") -echo +$line \"$file\" "# $(cut -d: -f4- <<<"$res")" +echo +$line \"$file\" #"# $(cut -d: -f4- <<<"$res")" diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc @@ -3,6 +3,7 @@ # for examples set -o vi +export LC_CTYPE="en_US.UTF-8" export NIXPKGS=$HOME/nixpkgs export NIX_PATH="nixpkgs=$NIXPKGS:$NIX_PATH" export NIX_PATH="nixos-config=$NIX_FILES:$NIX_PATH" @@ -22,7 +23,7 @@ export PS0='\033[0m' export HISTSIZE=50000 export HISTCONTROL=ignoredups # ... and ignore same sucessive entries. -export HISTCONTROL=ignoreboth +#export HISTCONTROL=ignoreboth # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. diff --git a/dotfiles/.config/neomutt/neomuttrc b/dotfiles/.config/neomutt/neomuttrc @@ -17,8 +17,10 @@ set reverse_name=yes set reverse_realname=no alternates ^jb55@jb55.com$ ^will.casarin@steamoji.com$ -set sort = threads +#set sort = threads #set sort_aux = reverse-last-date-received +#set sort = reverse-last-date-received +set sort = last-date-received virtual-mailboxes \ "INBOX" "notmuch://?query=query:inbox" \ @@ -35,11 +37,11 @@ virtual-mailboxes \ "today" "notmuch://?query=query:today" \ "work" "notmuch://?query=query:work" -macro index,pager a "<modify-labels>-unread -inbox<enter>j<enter> +macro index,pager a "<modify-labels>-unread -inbox<enter> macro index,pager A "<create-alias>" "Create alias" macro index,pager F "<modify-labels>+filed" "File message" macro index,pager + "<modify-labels>+" -macro index,pager S "<modify-labels>+spam -unread -inbox<enter>j<enter> +macro index,pager S "<modify-labels>+spam -unread -inbox<enter> macro index c "<change-vfolder>?" "Change to vfolder overview" macro index \\\\ "<vfolder-from-query>" "Search mailbox" macro pager p "|delta --paging always<enter>" diff --git a/dotfiles/.config/nvim/init.vim b/dotfiles/.config/nvim/init.vim @@ -29,6 +29,14 @@ nmap <C-s> ^D nmap <C-n> :tn<CR> nmap <C-p> :tp<CR> +" autoparens +"ino " ""<left> +"ino ' ''<left> +"ino ( ()<left> +"ino [ []<left> +"ino { {}<left> +"ino {<CR> {<CR>}<ESC>O + imap <A-j> { imap <A-k> } imap <A-n> [ diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig @@ -93,8 +93,6 @@ hideCampaign = true [github] user = jb55 -[commit] - template = ~/.git-template [grep] lineNumber = true [credential "https://github.com"] diff --git a/dotfiles/.mail_aliases b/dotfiles/.mail_aliases @@ -1,5 +1,6 @@ alias hank Henry Horkoff <hank.horkoff@steamoji.com> alias owen Owen Hann <owen.hann@steamoji.com> +alias matt Matt Richards <matt.richards@steamoji.com> alias mikhail Mikhail Baiman <mikhail.baiman@steamoji.com> alias alex Alex Chunn <alex.chunn@steamoji.com> alias jesse Jesse Brydle <jesse.brydle@steamoji.com> diff --git a/dotfiles/commands b/dotfiles/commands @@ -44,12 +44,12 @@ h run history fuzz-run-hist jt jump tag fuzz-jump-tag nai notmuch archive inbox fuzz-notmuch-archive-inbox nam notmuch am fuzz-notmuch-am +ng notmuch github patch fuzz-notmuch-gam nat notmuch archive fuzz-notmuch-archive Nc new command echo make-script ni notmuch inbox fuzz-notmuch-inbox nT email today echo f nt query:today nt notmuch threads fuzz-notmuch-threads -ng notmuch github patch fuzz-notmuch-ghpatch of open file fuzz-open-file olf open last files fuzz-last-files open pc cat project file fuzz-cat-file @@ -73,6 +73,7 @@ wn work notes echo edit /home/jb55/projects/steamoji/doc/$(ls -1pt /home/jb55/pr wsg work service gql fuzzedit schema '^' wsm work service mutations fuzzedit mutation '^func ' wsq work service queries fuzzedit query '^func ' +wsp work service permissions fuzzedit permission.go '^"' wdq work dashboard queries fuzzedit queries '^' wtb work trello backlog fuzz-trello-sprint "^Backlog " wti work trello inprogress fuzz-trello-sprint "^In Progress " diff --git a/dotfiles/rssfeeds b/dotfiles/rssfeeds @@ -23,18 +23,21 @@ noagenda @pod http://feed.nashownotes.com/rss.xml peakpropsperity @blog,@busy https://feeds.feedburner.com/PeakProsperity portal @pod https://www.omnycontent.com/d/playlist/9b7dacdf-a925-4f95-84dc-ac46003451ff/1713c520-edb6-43a3-b1b9-acb8002fdae7/58e33a0c-f86b-41c5-a11c-acb8002fdaf5/podcast.rss quanta @blog https://api.quantamagazine.org/feed/ -quantapodcast @pod https://api.quantamagazine.org/feed/podcast/ sabine @yt https://www.youtube.com/feeds/videos.xml?channel_id=UC1yNl2E66ZzKApQdRuTQ4tw samharris @pod https://wakingup.libsyn.com/rss shitcoinchron @blog https://chainfail.substack.com/feed squarebitcoin @blog https://squareselfcustody.substack.com/feed.xml stackernews @busy https://stacker.news/rss -susskind @arxiv 'http://export.arxiv.org/api/query?search_query=au:susskind_l&sortBy=lastUpdatedDate&sortOrder=descending' thedrive @pod https://peterattiadrive.libsyn.com/rss veritasium @yt https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA -witten @arxiv 'http://export.arxiv.org/api/query?search_query=au:witten_e&sortBy=lastUpdatedDate&sortOrder=descending' -zvibern @arxiv 'http://export.arxiv.org/api/query?search_query=au:bern_zvi&sortBy=lastUpdatedDate&sortOrder=descending' -nielsen @arxiv 'http://export.arxiv.org/api/query?search_query=au:nielsen_m_a&sortBy=lastUpdatedDate&sortOrder=descending' -scott-aaronson @blog https://scottaaronson.blog/?feed=rss2 +susskind @arxiv @physics 'http://export.arxiv.org/api/query?search_query=au:susskind_l&sortBy=lastUpdatedDate&sortOrder=descending' +witten @arxiv @physics 'http://export.arxiv.org/api/query?search_query=au:witten_e&sortBy=lastUpdatedDate&sortOrder=descending' +zvibern @arxiv @physics 'http://export.arxiv.org/api/query?search_query=au:bern_zvi&sortBy=lastUpdatedDate&sortOrder=descending' +nielsen @arxiv @physics 'http://export.arxiv.org/api/query?search_query=au:nielsen_m_a&sortBy=lastUpdatedDate&sortOrder=descending' +maldacena @arxiv @physics 'http://export.arxiv.org/api/query?search_query=au:maldacena_j&sortBy=lastUpdatedDate&sortOrder=descending' +harlow @arxiv @physics 'http://export.arxiv.org/api/query?search_query=au:harlow_d&sortBy=lastUpdatedDate&sortOrder=descending' +bousso @arxiv @physics 'http://export.arxiv.org/api/query?search_query=au:bousso_r&sortBy=lastUpdatedDate&sortOrder=descending' +scott-aaronson @blog @physics https://scottaaronson.blog/?feed=rss2 dietterich-labs @yt https://www.youtube.com/feeds/videos.xml?channel_id=UCd02pSRrecAVFOPjB-bfv-Q allen-farrington @blog https://medium.com/feed/@allenfarrington +woit @blog https://www.math.columbia.edu/~woit/wordpress/?feed=rss2 diff --git a/jb55pkgs/default.nix b/jb55pkgs/default.nix @@ -67,8 +67,8 @@ in rec { zoom-link-opener = fetch { repo = "zoom-link-opener"; - rev = "0.1.1"; - sha256 = "013q814i7wcbl2ba5jpqkz00kpa1jaly53np30i4x01cfdfzywi3"; + rev = "0.1.2"; + sha256 = "sha256-sytjRdK+CVxnJU4EdVzZyK0c7TJJo+64kJfJTTrKwKM="; }; zebra = fetch { @@ -79,8 +79,8 @@ in rec { viscal = fetch-jb55 { repo = "viscal"; - rev = "4b87413babb4296d94ac8535f1160f7a0d507c4e"; - sha256 = "0lamxx6xh5b8f38sqyn2ghqplvvaaxwkmvd6gb3vwqyw2qr3vwga"; + rev = "b93b651522ca684e46603316df88b2c7241afecd"; + sha256 = "sha256-iOR3vztBqq+/7+tGDcRuU4HfsBuCLjPKKAflzAAsqOM="; }; datefmt = fetch { diff --git a/jb55pkgs/pkgs/hoogle-zen/default.nix b/jb55pkgs/pkgs/hoogle-zen/default.nix @@ -1,7 +1,7 @@ { pkgs ? import <nixpkgs> {}, stdenv ? pkgs.stdenv, bash ? pkgs.bash, - zenity ? pkgs.gnome3.zenity, + zenity ? pkgs.gnome.zenity, writeScript ? pkgs.writeScript }: stdenv.mkDerivation rec { diff --git a/jb55pkgs/pkgs/sharefile/default.nix b/jb55pkgs/pkgs/sharefile/default.nix @@ -9,7 +9,7 @@ , fetchFromGitHub }: let - inputs = [ perl perlPackages.URI rsync openssh coreutils ]; + inputs = [ perl perlPackages.URI perlPackages.AnyURIEscape rsync openssh coreutils ]; buildPaths = sep: fmt: "${lib.concatStringsSep sep (map fmt inputs)}"; in stdenv.mkDerivation rec { name = "sharefile-${version}"; diff --git a/jb55pkgs/pkgs/x11-rename/default.nix b/jb55pkgs/pkgs/x11-rename/default.nix @@ -3,7 +3,7 @@ fetchurl ? pkgs.fetchurl, bash ? pkgs.bash, xdotool ? pkgs.xdotool, - zenity ? pkgs.gnome3.zenity, + zenity ? pkgs.gnome.zenity, writeScript ? pkgs.writeScript }: let diff --git a/nix-config/environment/default.nix b/nix-config/environment/default.nix @@ -92,7 +92,8 @@ let jb55pkgs = import <jb55pkgs> { inherit pkgs; }; universal-ctags unixtools.xxd unzip - weechat + #weechat + websocat wget xonsh zip diff --git a/nix-config/environment/desktop/default.nix b/nix-config/environment/desktop/default.nix @@ -20,7 +20,7 @@ let gtk2rc = pkgs.writeText "gtk2rc" '' cmdtree zoom-link-opener x11-rename - hoogle-zen + #hoogle-zen viscal ]; @@ -35,21 +35,18 @@ let gtk2rc = pkgs.writeText "gtk2rc" '' mypkgs = (with pkgs; [ obs-studio - aerc - bitcoin clipmenu colorpicker dasht dmenu - dragon-drop + xdragon dunst dynamic-colors feh getmail6 # for getmail-gmail-xoauth-tokens - gnome3.gnome-calculator + gnome.gnome-calculator gtk-engine-murrine - #hwi - khal + hwi lagrange lastpass-cli libnotify @@ -61,24 +58,22 @@ let gtk2rc = pkgs.writeText "gtk2rc" '' oathToolkit pandoc pavucontrol + pamixer pinentry postgresql # psql - #python37Packages.trezor qalculate-gtk qutebrowser - rxvt_unicode-with-plugins + rxvt-unicode signal-desktop simplescreenrecorder slock spotify - #steam sxiv - texlive.combined.scheme-full todo-txt-cli + tdesktop userConfig vdirsyncer w3m - #wine wmctrl xautolock xbindkeys @@ -90,7 +85,14 @@ let gtk2rc = pkgs.writeText "gtk2rc" '' zathura zoom-us - df + #aerc + #bitcoin --- probably don't want a binary substitute of this + #khal + #python37Packages.trezor + #texlive.combined.scheme-full + #steam + #wine + #df ]) ++ jbpkgs; in { @@ -116,14 +118,15 @@ in { VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json"; # radv }; - programs.steam.enable = true; + programs.steam.enable = false; environment.systemPackages = if extra.is-minimal then (with pkgs; [ #steam #steam-run #wine + lastpass-cli - rxvt_unicode-with-plugins + rxvt-unicode ]) else mypkgs; programs.slock.enable = true; diff --git a/nix-config/machines/quiver/default.nix b/nix-config/machines/quiver/default.nix @@ -17,6 +17,8 @@ extra: documentation.nixos.enable = false; + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.extraModprobeConfig = '' options thinkpad_acpi enabled=0 ''; @@ -226,7 +228,7 @@ extra: services.postgresql = { dataDir = "/var/db/postgresql/10/"; - enable = true; + enable = false; package = pkgs.postgresql_10; # extraPlugins = with pkgs; [ pgmp ]; authentication = pkgs.lib.mkForce '' diff --git a/nix-config/misc/imap-notifier/default.nix b/nix-config/misc/imap-notifier/default.nix @@ -61,7 +61,7 @@ with extra; { IMAP_NOTIFY_PORT = "12788"; }; - path = with pkgs; [ eject utillinux muchsync notmuch bash openssh ]; + path = with pkgs; [ eject util-linux muchsync notmuch bash openssh ]; serviceConfig.Type = "simple"; serviceConfig.Restart = "always"; diff --git a/nix-config/nixpkgs/config.nix b/nix-config/nixpkgs/config.nix @@ -21,7 +21,7 @@ in { smbdSupport = true; }; - mpv = super.mpv-with-scripts.override { + mpv = pkgs.wrapMpv pkgs.mpv-unwrapped { scripts = [ pkgs.mpvScripts.mpris ]; }; @@ -34,15 +34,6 @@ in { inherit pkgs; }; - less = pkgs.lib.overrideDerivation super.less (attrs: { - patches = [ - (super.fetchurl { - url = "https://jb55.com/s/0001-Fix-regression-where-lastmark-isn-t-saved-250.patch"; - sha256 = "0171f3c60406232fdd24a3c7a59fa7dd92b673b612998a545459d704ba922ca2"; - }) - ]; - }); - msmtp = pkgs.lib.overrideDerivation super.msmtp (attrs: { patches = [ (super.fetchurl { @@ -58,10 +49,10 @@ in { ''; }); - weechat = super.weechat.override {configure = {availablePlugins, ...}: { - scripts = with super.weechatScripts; [ wee-slack weechat-matrix ]; - }; - }; + #weechat = super.weechat.override {configure = {availablePlugins, ...}: { + # scripts = with super.weechatScripts; [ wee-slack weechat-matrix ]; + # }; + #}; dunst = pkgs.lib.overrideDerivation super.dunst (attrs: { src = pkgs.fetchFromGitHub { diff --git a/nix-config/services/desktop/default.nix b/nix-config/services/desktop/default.nix @@ -24,7 +24,7 @@ in }; services.pcscd.enable = true; - services.gnome3.gnome-keyring.enable = if extra.is-minimal then false else true; + services.gnome.gnome-keyring.enable = if extra.is-minimal then false else true; services.trezord.enable = true; @@ -198,10 +198,10 @@ in description = "RXVT-Unicode Daemon"; wantedBy = [ "graphical-session.target" ]; after = [ "graphical-session.target" ]; - path = [ pkgs.rxvt_unicode-with-plugins ]; + path = [ pkgs.rxvt-unicode ]; serviceConfig = { Restart = "always"; - ExecStart = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtd -q -o"; + ExecStart = "${pkgs.rxvt-unicode}/bin/urxvtd -q -o"; }; };