Daniel Siepmann
3b6e9cfe01
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.
18 lines
318 B
Nix
18 lines
318 B
Nix
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
|
|
'';
|
|
};
|
|
}
|