Add custom script to push etckeeper state

I'm still on Ubuntu and use etckeeper to track changes to /etc.
This small script will push it to my own Gitea instance as a backup and
online history in case I need it.
This commit is contained in:
Daniel Siepmann 2022-05-15 21:40:35 +02:00
parent 38609c2725
commit 3b6e9cfe01
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 18 additions and 0 deletions

View file

@ -41,6 +41,7 @@
pkgs.networkmanager_dmenu
pkgs.dmenu-custom-scripts
pkgs.custom-update-system
pkgs.custom-push-etckeeper
pkgs.dunst
pkgs.st
pkgs.ncdu

View file

@ -0,0 +1,17 @@
self: super:
{
custom-push-etckeeper = super.pkgs.writeShellApplication {
name = "custom-push-etckeeper";
text = ''
mkdir /tmp/etckeeper
cd /tmp/etckeeper
sudo cp -r /etc/.git .
sudo chown -R daniels:daniels .
git push
cd /tmp
rm -rf /tmp/etckeeper
'';
};
}