Fixes and tweaks

work
mat ess 2023-01-04 12:05:00 -05:00
parent 76c0b03e49
commit a79e7a9664
2 changed files with 5 additions and 2 deletions

View File

@ -85,7 +85,7 @@ in
socket = "${primaryUser.homeDirectory}/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh"; socket = "${primaryUser.homeDirectory}/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
in in
lib.mkIf (caskPresent "secretive" && config ? home-manager) { lib.mkIf (caskPresent "secretive" && config ? home-manager) {
home.sessionVariables.SSH_AUTH_SOCKET = socket; home.sessionVariables.SSH_AUTH_SOCK = socket;
programs.ssh = { programs.ssh = {
enable = true; enable = true;
matchBlocks."*".extraOptions = { matchBlocks."*".extraOptions = {

View File

@ -5,10 +5,13 @@
let let
logPath = "${config.xdg.stateHome}/tarsnap"; logPath = "${config.xdg.stateHome}/tarsnap";
tarsnapBackup = pkgs.writeShellScriptBin "tarsnap-backup-helper" '' tarsnapBackup = pkgs.writeShellScriptBin "tarsnap-backup-helper" ''
date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
echo
echo "Running tarsnap backup for $date"
/opt/homebrew/bin/tarsnap -c \ /opt/homebrew/bin/tarsnap -c \
--configfile ${config.home.homeDirectory}/.tarsnaprc \ --configfile ${config.home.homeDirectory}/.tarsnaprc \
--keyfile ${config.xdg.configHome}/tarsnap/write-only.key \ --keyfile ${config.xdg.configHome}/tarsnap/write-only.key \
-f $(uname -n)-$(date -u +%Y-%m-%dT%H:%M:%SZ) \ -f $(uname -n)-$date \
${config.home.homeDirectory}/{dotfiles.nix,Desktop,Development,Documents,Downloads} ${config.home.homeDirectory}/{dotfiles.nix,Desktop,Development,Documents,Downloads}
''; '';
in in