Streamline push etckeeper and os update

The os update and backup now include etckeeper as its part of the
workflow.
The os updates now have the same name on all systems. That should reduce
friction, same command for same workflow, just different implementation.
This commit is contained in:
Daniel Siepmann 2023-03-16 08:34:24 +01:00
parent 0a1e2f8012
commit bb64b6d859
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
4 changed files with 19 additions and 8 deletions

View file

@ -98,5 +98,4 @@ with pkgs; [
# hikari 2 # hikari 2
(callPackage ./packages/custom/update-ubuntu-system { }) (callPackage ./packages/custom/update-ubuntu-system { })
(callPackage ./packages/custom/push-etckeeper { })
]) ])

View file

@ -1,8 +1,9 @@
{ {
writeShellApplication, writeShellApplication
borgbackup, , borgbackup
git, , git
rsync , rsync
, callPackage
}: }:
writeShellApplication { writeShellApplication {
@ -12,6 +13,7 @@ writeShellApplication {
borgbackup borgbackup
rsync rsync
git git
(callPackage ../push-etckeeper { })
]; ];
text = '' text = ''
@ -29,5 +31,6 @@ writeShellApplication {
sudo chown daniels:daniels -R /media/daniels/Backup/etc/ sudo chown daniels:daniels -R /media/daniels/Backup/etc/
cd /media/daniels/Backup/etc/ cd /media/daniels/Backup/etc/
git reset --hard master git reset --hard master
custom-push-etckeeper
''; '';
} }

View file

@ -1,7 +1,7 @@
{ writeShellApplication }: { writeShellApplication }:
writeShellApplication { writeShellApplication {
name = "custom-update-nixos-system"; name = "custom-update-operating-system";
text = '' text = ''
sudo nixos-rebuild switch --upgrade-all sudo nixos-rebuild switch --upgrade-all

View file

@ -1,7 +1,14 @@
{ writeShellApplication }: {
writeShellApplication
, callPackage
}:
writeShellApplication { writeShellApplication {
name = "custom-update-ubuntu-system"; name = "custom-update-operating-system";
runtimeInputs = [
(callPackage ../push-etckeeper { })
];
text = '' text = ''
sudo apt update sudo apt update
@ -9,6 +16,8 @@ writeShellApplication {
sudo apt upgrade -V -y sudo apt upgrade -V -y
sudo apt autoremove -y sudo apt autoremove -y
custom-push-etckeeper
sudo fwupdmgr refresh sudo fwupdmgr refresh
sudo fwupdmgr get-updates sudo fwupdmgr get-updates
fwupdmgr update -y fwupdmgr update -y