Move wiki configuration
This commit is contained in:
parent
02a0dd96eb
commit
c88993e4b5
3 changed files with 39 additions and 32 deletions
|
@ -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
|
||||
);
|
||||
}
|
||||
))
|
||||
];
|
||||
}
|
||||
{ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue