Move wiki configuration
This commit is contained in:
parent
02a0dd96eb
commit
c88993e4b5
3 changed files with 39 additions and 32 deletions
|
@ -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
|
||||
|
|
33
hosts/t480/modules/wiki.nix
Normal file
33
hosts/t480/modules/wiki.nix
Normal 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
|
||||
);
|
||||
}
|
||||
))
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue