Move wiki-pull
to a zsh alias, remove from
...PW05CH3L
This commit is contained in:
parent
6c782845a3
commit
f3713050cb
5 changed files with 27 additions and 88 deletions
|
@ -72,24 +72,35 @@
|
|||
};
|
||||
};
|
||||
|
||||
programs.dev-commit = {
|
||||
enable = true;
|
||||
|
||||
repoPaths =
|
||||
let
|
||||
personal = "${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/personal";
|
||||
in
|
||||
[
|
||||
"${personal}/email-filters"
|
||||
"${personal}/nix-config"
|
||||
"${personal}/oliverdavies.uk-tome"
|
||||
"${personal}/opentofu-dns"
|
||||
];
|
||||
|
||||
schedule = {
|
||||
programs = {
|
||||
dev-commit = {
|
||||
enable = true;
|
||||
time = "daily";
|
||||
|
||||
repoPaths =
|
||||
let
|
||||
personal = "${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/personal";
|
||||
in
|
||||
[
|
||||
"${personal}/email-filters"
|
||||
"${personal}/nix-config"
|
||||
"${personal}/oliverdavies.uk-tome"
|
||||
"${personal}/opentofu-dns"
|
||||
];
|
||||
|
||||
schedule = {
|
||||
enable = true;
|
||||
time = "daily";
|
||||
};
|
||||
};
|
||||
|
||||
zsh.shellAliases =
|
||||
let
|
||||
inherit (config.xdg.userDirs) documents;
|
||||
in
|
||||
{
|
||||
"wiki-push" =
|
||||
"rsync -avzP ${documents}/wiki nixedo.oliverdavies.uk:${documents} --delete --delete-after";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."pam-gnupg".text = ''
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
../common
|
||||
|
||||
../../users/opdavies.nix
|
||||
|
||||
./modules/wiki.nix
|
||||
];
|
||||
|
||||
cli = {
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{ 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 \
|
||||
--exclude result \
|
||||
${remoteIpAddress}:${wikiPath}/ ${wikiPath} "$@"
|
||||
'';
|
||||
})
|
||||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "wiki-push";
|
||||
|
||||
text = ''
|
||||
${getExe pkgs.rsync} -avz --update \
|
||||
${wikiPath}/ ${remoteIpAddress}:${wikiPath} "$@"
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,6 +4,5 @@
|
|||
./neomutt.nix
|
||||
./newsboat
|
||||
./ollama.nix
|
||||
./wiki.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
home-manager.users.opdavies =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeShellApplication (
|
||||
let
|
||||
remoteIpAddresses = [
|
||||
"nixedo.local"
|
||||
];
|
||||
|
||||
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