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

@ -12,6 +12,9 @@
../../modules/mixins/tmux.nix
../../modules/mixins/zsh
./modules/notes.nix
./modules/wiki.nix
../common
../../users/opdavies
];

View file

@ -0,0 +1,36 @@
{ lib, ... }:
with lib;
{
home-manager.users.opdavies =
{ config, pkgs, ... }:
{
home =
let
remoteIpAddress = "192.168.1.111";
wikiPath = "${config.xdg.userDirs.documents}/wiki";
in
{
packages = [
(pkgs.writeShellApplication {
name = "wiki-pull";
text = ''
${getExe pkgs.rsync} -avz --update \
${remoteIpAddress}:${wikiPath}/ ${wikiPath} "$@"
'';
})
(pkgs.writeShellApplication {
name = "wiki-push";
text = ''
${getExe pkgs.rsync} -avz --update \
${wikiPath}/ ${remoteIpAddress}:${wikiPath} "$@"
'';
})
];
};
};
}