diff --git a/home/opdavies/hosts/PW05CH3L.nix b/home/opdavies/hosts/PW05CH3L.nix index 1f9d7f86..335b3926 100644 --- a/home/opdavies/hosts/PW05CH3L.nix +++ b/home/opdavies/hosts/PW05CH3L.nix @@ -1,3 +1,10 @@ +{ + config, + lib, + pkgs, + ... +}: + { homeManagerModules = { direnv.enable = true; @@ -12,7 +19,34 @@ tmux-sessionizer.enable = true; }; - home.sessionVariables = { - WAYLAND_DISPLAY = ""; - }; + home = + let + remoteIpAddress = "192.168.1.111"; + wikiPath = "${config.xdg.userDirs.documents}/wiki"; + in + { + packages = [ + (pkgs.writeShellApplication { + name = "wiki-pull"; + + text = '' + ${lib.getExe pkgs.rsync} -avz --update \ + ${remoteIpAddress}:${wikiPath}/ ${wikiPath} "$@" + ''; + }) + + (pkgs.writeShellApplication { + name = "wiki-push"; + + text = '' + ${lib.getExe pkgs.rsync} -avz --update \ + ${wikiPath}/ ${remoteIpAddress}:${wikiPath} "$@" + ''; + }) + ]; + + sessionVariables = { + WAYLAND_DISPLAY = ""; + }; + }; }