Move wiki-pull to a zsh alias, remove from

...PW05CH3L
This commit is contained in:
Oliver Davies 2025-05-06 19:51:38 +01:00
parent 6c782845a3
commit f3713050cb
5 changed files with 27 additions and 88 deletions

View file

@ -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 = ''

View file

@ -5,8 +5,6 @@
../common
../../users/opdavies.nix
./modules/wiki.nix
];
cli = {

View file

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

View file

@ -4,6 +4,5 @@
./neomutt.nix
./newsboat
./ollama.nix
./wiki.nix
];
}

View file

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