Move wiki configuration

This commit is contained in:
Oliver Davies 2025-04-05 23:17:12 +01:00
parent 02a0dd96eb
commit c88993e4b5
3 changed files with 39 additions and 32 deletions

View file

@ -1,32 +1 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
backup-websites
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
);
}
))
];
}
{ }