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 = {
|
programs = {
|
||||||
enable = true;
|
dev-commit = {
|
||||||
|
|
||||||
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;
|
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 = ''
|
xdg.configFile."pam-gnupg".text = ''
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
../common
|
../common
|
||||||
|
|
||||||
../../users/opdavies.nix
|
../../users/opdavies.nix
|
||||||
|
|
||||||
./modules/wiki.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
cli = {
|
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
|
./neomutt.nix
|
||||||
./newsboat
|
./newsboat
|
||||||
./ollama.nix
|
./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