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

@ -33,6 +33,7 @@
./modules/neomutt.nix
./modules/newsboat
./modules/notes.nix
./modules/wiki.nix
];
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
@ -63,12 +64,16 @@
environment.systemPackages = with pkgs; [
abook
backup-websites
displayselect
gtypist
isync
pam_gnupg
peek
slack
sxiv
ttyper
upload-to-files
yt-dlp
zeroad
zoom-us

View file

@ -0,0 +1,33 @@
{ lib, ... }:
with lib;
{
home-manager.users.opdavies =
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
(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: ''
${getExe pkgs.rsync} -avz --update \
--delete --delete-after \
${wikiPath}/ ${ipAddress}:${wikiPath} "$@"
'') remoteIpAddresses
);
}
))
];
};
}