diff --git a/home/opdavies/hosts/t480.nix b/home/opdavies/hosts/t480.nix index 8b43909d..c6c6f0fc 100644 --- a/home/opdavies/hosts/t480.nix +++ b/home/opdavies/hosts/t480.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { homeManagerModules = { @@ -32,6 +32,28 @@ displayselect isync upload-to-files + + (pkgs.writeShellApplication ( + let + remoteIpAddresses = [ + "116.203.11.255" + "192.168.1.116" + ]; + + wikiPath = "${config.xdg.userDirs.documents}/wiki"; + in + { + name = "wiki-push"; + + text = builtins.concatStringsSep "\n" ( + map (ipAddress: '' + ${lib.getExe pkgs.rsync} -avz --update \ + --delete --delete-after \ + ${wikiPath}/ ${ipAddress}:${wikiPath} "$@" + '') remoteIpAddresses + ); + } + )) ]; programs.neomutt = {