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

@ -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
);
}
))
];
}

View file

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