Move wiki configuration
This commit is contained in:
parent
d4a9f2f3af
commit
91d9643bd5
3 changed files with 40 additions and 35 deletions
|
@ -1,35 +1 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
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} "$@"
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
{ }
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
../../modules/mixins/tmux.nix
|
||||
../../modules/mixins/zsh
|
||||
|
||||
./modules/notes.nix
|
||||
./modules/wiki.nix
|
||||
|
||||
../common
|
||||
../../users/opdavies
|
||||
];
|
||||
|
|
36
hosts/PW05CH3L/modules/wiki.nix
Normal file
36
hosts/PW05CH3L/modules/wiki.nix
Normal 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} "$@"
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue