From cf9bc70c624305394d3e01ccc90c731b5fa8fd2a Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Sat, 8 Apr 2023 12:13:34 -0400 Subject: [PATCH] Add diary --- configs/home.nogui.nix | 1 + configs/programs/fish.nix | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configs/home.nogui.nix b/configs/home.nogui.nix index 4fbf965..98e9e09 100644 --- a/configs/home.nogui.nix +++ b/configs/home.nogui.nix @@ -19,6 +19,7 @@ bat dw rclone + bubblewrap ] ++ (import ../system/home-manager.nix).extraPackages pkgs; editorconfig = { enable = true; diff --git a/configs/programs/fish.nix b/configs/programs/fish.nix index 0504869..f684302 100644 --- a/configs/programs/fish.nix +++ b/configs/programs/fish.nix @@ -20,13 +20,14 @@ pkgs: { s = "kitty +kitten ssh"; weather = "curl wttr.in/43.0844,-77.6749"; }; - shellAbbrs = { + shellAbbrs = rec { ns = "nix-shell --run fish -p"; unlock-rclone = "set -x RCLONE_CONFIG_PASS (pass rclone)"; ":qa" = "exit"; ":q" = "exit"; "rmount" = "rclone --rc --rc-web-gui --rc-no-auth --cache-dir /tmp/rclone-cache mount --vfs-cache-mode full --vfs-cache-max-size 8Gi"; - "backup" = "restic -r rclone:rit:'Restic Backups/'(hostname | sed \"s/\\(.\\)/\\u\\1/\") -p (pass backups | psub) backup ~/ --exclude-caches --exclude-file=${import ./restic.nix}"; + "backup" = "${unlock-rclone} && restic -r rclone:rit:'Restic Backups/'(hostname | sed \"s/\\(.\\)/\\u\\1/\") -p (pass backups | psub) backup ~/ --exclude-caches --exclude-file=${import ./restic.nix}"; + "diary" = "bwrap --bind ~/Diary/gate/ / --bind ~/Diary/store /store --ro-bind /nix /nix --bind /run /run -- (whereis -b restic | cut -c 9-) -r /store -p (pass diary | psub) backup -H 'diary' -e /nix -e /run -e /store -e /home /"; "dl" = "wget (kitty +kitten clipboard --get-clipboard)"; }; shellInit = ''