Add wiki-push and wiki-pull scripts
This commit is contained in:
parent
f0b37c1813
commit
af3c7b2f2b
1 changed files with 37 additions and 3 deletions
|
@ -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 = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue