~jb55/citadel

c63c272c080ba3f330b7d6aa65e73abca8561774 — William Casarin 11 months ago fadc746 + 3751951
Merge remote-tracking branch 'monad/master' into master
M bin/btc-txs-raw => bin/btc-txs-raw +1 -1
@@ 7,5 7,5 @@ do
  bcli -rpcwallet="$wallet" "$@" listtransactions '*' 2000 \
      | jq -rc '.[] | {label: .label, address: .address, category: .category, amount: .amount, blocktime: .blocktime}'
done) \
  | jq -src 'sort_by(.time) | .[] | [.label,.address,.category,.amount,(.blocktime | strftime("%F %R"))] | @tsv'
  | jq -src 'sort_by(.blocktime) | .[] | [.label,.address,.category,.amount,.blocktime] | @tsv'


M bin/nannypay => bin/nannypay +2 -2
@@ 12,11 12,11 @@ if [ "$NANNY" == "lisbeth" ]; then
fi

if [ "$NANNY" == "maribel" ]; then
    pay=18
    pay=20
fi

if [ "$NANNY" == "diana" ]; then
    pay=17
    pay=20
fi

if [ "$NANNY" == "laura" ]; then

M bin/steamoji-code => bin/steamoji-code +1 -0
@@ 1,4 1,5 @@
#!/usr/bin/env bash
date -u +'Now:  %a, %d %b %Y %R:%S +0000'
notmuch show from:verification@steamoji.com and date:today |
grep -e '^Your verification' -e ^Date |
head -n2

M dotfiles/.bash_aliases => dotfiles/.bash_aliases +1 -0
@@ 62,6 62,7 @@ function run_fuzzer() {
	eval "$(fuzz-run-command "$@")"
}

alias t="todo.sh"
alias e="edit -n"
alias g=git
alias f=run_fuzzer

M dotfiles/.config/mimi/mime.conf => dotfiles/.config/mimi/mime.conf +2 -2
@@ 3,9 3,9 @@ text/: edit
application/pdf: zathura
text/html: browser
html: browser
video/: vlc
video/: mpv
image/: feh
audio/: vlc
audio/: mpv
svg: feh --conversion-timeout 2
lightning: urxvtc -e /home/jb55/bin/lightning-handler
application/x-tar: urxvtc -e una

M dotfiles/.config/nvim/init.vim => dotfiles/.config/nvim/init.vim +3 -0
@@ 16,3 16,6 @@ syntax on

set clipboard+=unnamedplus

let mapleader = "\\"
let maplocalleader = "\\"
nmap <Leader>xda ma:%s/\s\+$//g<CR>`a

M dotfiles/.spacemacs => dotfiles/.spacemacs +2 -65
@@ 4,85 4,22 @@
;; It must be stored in your home directory.

(setq jb55/base-layers
  '((haskell :variables
             haskell-enable-ghc-mod-support nil
             haskell-enable-hindent-style "chris-done")

    (c-c++ :variables
           c-c++-enable-clang-support t
           c-c++-backend 'rtags
           )

  '(
    (auto-completion :variables auto-completion-enable-help-tooltip t)


    csharp
    confluence
    react
    csv
    debug
    elm
    emacs-lisp
    emoji
    finance
    fsharp
    git
    github
    go
    gtags
    html
    react
    ;idris
    ivy
    javascript
    latex
    lua
    markdown
    nixos
    notmuch
    (org :variables org-want-todo-bindings t
                    org-enable-trello-support t)
    purescript
    python
    racket
    rust
    shell-scripts
    ;sml
    spacemacs-layouts
    sql
    syntax-checking
    twitter
    typescript
    yaml
    (org :variables org-want-todo-bindings t)

   ))

(setq jb55/additional-packages
  '( company-irony
     base16-theme
     bison-mode
     envrc
  '(  envrc
     editor-config
     emojify
     forge
     github-review
     glsl-mode
     ;gnu-apl-mode
     graphviz-dot-mode
     helm-pages
     ;jade-mode
     markdown-mode
     mastodon
     meson-mode
     olivetti
     org-brain
     org-kanban
     org-clock-csv
     protobuf-mode
     ;shen-mode
     w3m
     weechat

     (notmuch
       :location (recipe :fetcher github

M dotfiles/commands => dotfiles/commands +1 -0
@@ 6,6 6,7 @@ eFc	edit fuzz command	fuzz-edit-command
sFc	show fuzz command	fuzz-show-fuzz-command
of	open file	fuzz-open-file
ec	edit commands	fuzz-edit-scripts
em	edit mimi	echo edit ~/.config/mimi/mime.conf
sc	show command	fuzz-show-script
sh	show history	fuzz-show-hist
Nc	new command	echo make-script

M jb55pkgs/default.nix => jb55pkgs/default.nix +2 -2
@@ 50,8 50,8 @@ in rec {

  datefmt = fetch {
    repo = "datefmt";
    rev  = "0.1.1";
    sha256 = "1xjfr1lbkiy277firlb8zkg1pmj7pmiijhxx1z4bg41970dr446x";
    rev  = "67a176de6db75fddecd0239dd6afe2659b1b1b46";
    sha256 = "08as7m9fnsidryx9bm6bwp1hq43g59icv97x58zfrgpk68y8v785";
  };

  btcs = fetch {

M nix-config/machines/monad/config/default.nix => nix-config/machines/monad/config/default.nix +1 -1
@@ 1,6 1,6 @@
pkgs: rec {
  hostId = "d7ee0243"; # needed for zfs
  ztip = "172.24.172.111";
  ztip = "10.100.0.1";
  nix-serve = {
    port = 10845;
    bindAddress = ztip;

M nix-config/machines/monad/hardware/default.nix => nix-config/machines/monad/hardware/default.nix +0 -31
@@ 1,14 1,5 @@
{ config, lib, pkgs, ... }:
{
  # fileSystems."/" =
  #   { device = "/dev/disk/by-uuid/62518649-0872-49e2-a269-34975e314c6a";
  #     fsType = "ext4";
  #   };

  # fileSystems."/" =
  #   { device = "/dev/nvme0n1p1";
  #     fsType = "zfs";
  #nixos-generate-config --root /mnt   };

  boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "amdgpu" "vfio-pci" ];
  boot.initrd.preDeviceCommands = ''


@@ 39,28 30,6 @@
      fsType = "zfs";
    };

  #fileSystems."/vr" =
  # { device = "/dev/disk/by-uuid/E234A89834A87169";
  #   fsType = "ntfs";
  # };

  #fileSystems."/sand" =
  #  { device = "/dev/disk/by-uuid/2ee709b8-7e83-470f-91bc-d0b0ba59b945";
  #    fsType = "ext4";
  #  };

  # fileSystems."/home/jb55/shares/will-vm/projects" =
  #   { device = "//192.168.86.199/Users/jb55/projects";
  #     fsType = "cifs";
  #     options = ["username=jb55" "password=notsecurepw" "gid=100" "uid=1000"];
  #   };

  #fileSystems."/home/jb55/.local/share/Steam/steamapps" =
  #  { device = "/sand/data/SteamAppsLinux";
  #    fsType = "none";
  #    options = ["bind"];
  #  };

  # swapDevices =
  #   [ { device = "/dev/disk/by-uuid/d4e4ae51-9179-439d-925b-8df42dd1bfc5"; }
  #   ];

M nix-config/machines/monad/networking/default.nix => nix-config/machines/monad/networking/default.nix +5 -4
@@ 4,7 4,7 @@ let
  chromecastIP = "192.168.86.190";
  iptables = "iptables -A nixos-fw";
  ipr = "${pkgs.iproute}/bin/ip";
  hasVPN = builtins.hasAttr "services" config.services.openvpn && config.services.openvpn.services.pia != null;
  hasVPN = true;
  writeBash = extra.util.writeBash;
  transmission-dir = "/zbig/torrents";
  download-dir = "${transmission-dir}/Downloads";


@@ 35,23 35,24 @@ let
    dns = 53;
    http = 80;
    wireguard = 51820;
    weechat = 9000;
    inherit (extra.private) notify-port;
  };

  firewallRules = [
    "nixos-fw -s 10.100.0.1/24,192.168.86.1/24 -p tcp --dport 8080 -j nixos-fw-accept" # dev
    "nixos-fw -s 10.100.0.1/24 -p tcp --dport 80 -j nixos-fw-accept"
    "nixos-fw -s 10.100.0.1/24 -p tcp --dport 3000 -j nixos-fw-accept"
    "nixos-fw -s 10.100.0.1/24 -p tcp --dport ${toString ports.weechat} -j nixos-fw-accept"
    "nixos-fw -s 10.100.0.1/24,192.168.86.1/24 -p tcp --dport 8333 -j nixos-fw-accept" # bitcoin
    "nixos-fw -s 192.168.122.218 -p udp --dport 137 -j nixos-fw-accept"
    "nixos-fw -s 192.168.122.218 -p udp --dport 138 -j nixos-fw-accept"
    "nixos-fw -s 192.168.122.218 -p tcp --dport 139 -j nixos-fw-accept"
    "nixos-fw -s 192.168.122.218 -p tcp --dport 445 -j nixos-fw-accept"
  ]
  ++ lib.optional hasVPN [
    "OUTPUT -t mangle   -m cgroup --cgroup 11 -j MARK --set-mark 11"
    "POSTROUTING -t nat -m cgroup --cgroup 11 -o tun0 -j MASQUERADE"
  ];


  addRule = rule: "iptables -A ${rule}";
  rmRule = rule: "iptables -D ${rule} || true";
  extraCommands = lib.concatStringsSep "\n" (map addRule firewallRules);

M nix-config/misc/imap-notifier/default.nix => nix-config/misc/imap-notifier/default.nix +5 -3
@@ 74,14 74,16 @@ with extra; {
            set -e
            export HOME=/home/jb55
            export DATABASEDIR=$HOME/mail/personal
	    EVAR=/home/jb55/var/notify
	    LAST_COUNT=$EVAR/last-email-count

            notify() {
              local c=$(notmuch --config /home/jb55/.notmuch-config-personal count 'tag:inbox and not tag:filed and not tag:noise')
              local lc=$c
              if [ -f /tmp/last-email-count ]; then
                lc=$(</tmp/last-email-count)
              if [ -f $LAST_COUNT ]; then
                lc=$(<$LAST_COUNT)
              fi
              echo "$c" > /tmp/last-email-count
              echo "$c" > $LAST_COUNT
              if [ -f ~/var/notify/home ] && [ $c -ne $lc ]; then
                ${pkgs.libnotify}/bin/notify-send -i email-new "You Got Mail (inbox $c)"
              fi