Move wiki configuration

This commit is contained in:
Oliver Davies 2025-04-05 23:02:01 +01:00
parent d4a9f2f3af
commit 91d9643bd5
3 changed files with 40 additions and 35 deletions

View file

@ -1,35 +1 @@
{
config,
lib,
pkgs,
...
}:
{
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} "$@"
'';
})
];
};
}
{ }