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:
parent
38609c2725
commit
3b6e9cfe01
1
home.nix
1
home.nix
|
@ -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
|
||||
|
|
17
overlays/custom-push-etckeeper/default.nix
Normal file
17
overlays/custom-push-etckeeper/default.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue