Add wiki-push script
This commit is contained in:
parent
0fe9d1a692
commit
88a3755699
1 changed files with 23 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
homeManagerModules = {
|
homeManagerModules = {
|
||||||
|
@ -32,6 +32,28 @@
|
||||||
displayselect
|
displayselect
|
||||||
isync
|
isync
|
||||||
upload-to-files
|
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 = {
|
programs.neomutt = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue