mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-09-07 20:20:43 +02:00
feat: topgrade
This commit is contained in:
@@ -107,99 +107,99 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
update = {
|
# update = {
|
||||||
body =
|
# body =
|
||||||
if userConfig.isNixOS then
|
# if userConfig.isNixOS then
|
||||||
# fish
|
# # fish
|
||||||
''
|
# ''
|
||||||
echo "=== System packages update ==="
|
# echo "=== System packages update ==="
|
||||||
pushd /etc/nixos
|
# pushd /etc/nixos
|
||||||
|
|
||||||
if git pull
|
# if git pull
|
||||||
git add -A
|
# git add -A
|
||||||
git commit --allow-empty -m "chore: state before system update"
|
# git commit --allow-empty -m "chore: state before system update"
|
||||||
|
#
|
||||||
|
# nix flake update
|
||||||
|
#
|
||||||
|
# if test $status -eq 0
|
||||||
|
# git add ./flake.lock
|
||||||
|
# git commit --allow-empty -m "chore: update system flake.lock"
|
||||||
|
# reload_system
|
||||||
|
# git push
|
||||||
|
# else
|
||||||
|
# echo "Error while updating system flake!"
|
||||||
|
# end
|
||||||
|
# else
|
||||||
|
# echo "Error: 'git pull' failed in /etc/nixos. Skipping system update."
|
||||||
|
# end
|
||||||
|
|
||||||
nix flake update
|
# popd
|
||||||
|
|
||||||
if test $status -eq 0
|
# echo "=== User packages update ==="
|
||||||
git add ./flake.lock
|
# pushd $HOME/.config/home-manager
|
||||||
git commit --allow-empty -m "chore: update system flake.lock"
|
|
||||||
reload_system
|
|
||||||
git push
|
|
||||||
else
|
|
||||||
echo "Error while updating system flake!"
|
|
||||||
end
|
|
||||||
else
|
|
||||||
echo "Error: 'git pull' failed in /etc/nixos. Skipping system update."
|
|
||||||
end
|
|
||||||
|
|
||||||
popd
|
# if git pull
|
||||||
|
# git add -A
|
||||||
|
# git commit --allow-empty -m "chore: state before home-manager update"
|
||||||
|
#
|
||||||
|
# nix flake update
|
||||||
|
#
|
||||||
|
# if test $status -eq 0
|
||||||
|
# git add ./flake.lock
|
||||||
|
# git commit --allow-empty -m "chore: update home flake.lock"
|
||||||
|
# git push
|
||||||
|
# reload_dotfiles
|
||||||
|
# else
|
||||||
|
# echo "Error while updating home flake!"
|
||||||
|
# end
|
||||||
|
# else
|
||||||
|
# echo "Error: 'git pull' failed in home-manager. Skipping user update."
|
||||||
|
# end
|
||||||
|
|
||||||
echo "=== User packages update ==="
|
# popd
|
||||||
pushd $HOME/.config/home-manager
|
|
||||||
|
|
||||||
if git pull
|
# if type -q flatpak
|
||||||
git add -A
|
# echo "=== Flatpak update ==="
|
||||||
git commit --allow-empty -m "chore: state before home-manager update"
|
# flatpak update --noninteractive
|
||||||
|
#
|
||||||
|
# echo "=== Flatpak remove unused ==="
|
||||||
|
# flatpak uninstall --unused --noninteractive
|
||||||
|
# end
|
||||||
|
# ''
|
||||||
|
# else
|
||||||
|
# # fish
|
||||||
|
# ''
|
||||||
|
# echo "===System update==="
|
||||||
|
|
||||||
nix flake update
|
# if not type -q yay
|
||||||
|
# echo "Yay not found… Please consider installing it!"
|
||||||
|
# else
|
||||||
|
# yay
|
||||||
|
# end
|
||||||
|
|
||||||
if test $status -eq 0
|
# if type -q pacman
|
||||||
git add ./flake.lock
|
# echo "===Remove orphans==="
|
||||||
git commit --allow-empty -m "chore: update home flake.lock"
|
# set orphans (pacman -Qtdq)
|
||||||
git push
|
# if test (count $orphans) -gt 0
|
||||||
reload_dotfiles
|
# sudo pacman -Rns $orphans
|
||||||
else
|
# end
|
||||||
echo "Error while updating home flake!"
|
# end
|
||||||
end
|
|
||||||
else
|
|
||||||
echo "Error: 'git pull' failed in home-manager. Skipping user update."
|
|
||||||
end
|
|
||||||
|
|
||||||
popd
|
# if type -q flatpak
|
||||||
|
# echo "===Flatpak update==="
|
||||||
|
# flatpak update --noninteractive
|
||||||
|
# echo "===Flatpak remove unused==="
|
||||||
|
# flatpak uninstall --unused
|
||||||
|
# end
|
||||||
|
|
||||||
if type -q flatpak
|
# if type -q nix-channel
|
||||||
echo "=== Flatpak update ==="
|
# echo "===Nix update==="
|
||||||
flatpak update --noninteractive
|
# nix-channel --update
|
||||||
|
# echo "===Nix garbage collection==="
|
||||||
echo "=== Flatpak remove unused ==="
|
# home-manager expire-generations "-7 days"
|
||||||
flatpak uninstall --unused --noninteractive
|
# end
|
||||||
end
|
# '';
|
||||||
''
|
# };
|
||||||
else
|
|
||||||
# fish
|
|
||||||
''
|
|
||||||
echo "===System update==="
|
|
||||||
|
|
||||||
if not type -q yay
|
|
||||||
echo "Yay not found… Please consider installing it!"
|
|
||||||
else
|
|
||||||
yay
|
|
||||||
end
|
|
||||||
|
|
||||||
if type -q pacman
|
|
||||||
echo "===Remove orphans==="
|
|
||||||
set orphans (pacman -Qtdq)
|
|
||||||
if test (count $orphans) -gt 0
|
|
||||||
sudo pacman -Rns $orphans
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if type -q flatpak
|
|
||||||
echo "===Flatpak update==="
|
|
||||||
flatpak update --noninteractive
|
|
||||||
echo "===Flatpak remove unused==="
|
|
||||||
flatpak uninstall --unused
|
|
||||||
end
|
|
||||||
|
|
||||||
if type -q nix-channel
|
|
||||||
echo "===Nix update==="
|
|
||||||
nix-channel --update
|
|
||||||
echo "===Nix garbage collection==="
|
|
||||||
home-manager expire-generations "-7 days"
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
blog_build_and_push = {
|
blog_build_and_push = {
|
||||||
body =
|
body =
|
||||||
@@ -224,6 +224,7 @@
|
|||||||
ls = "eza --long --icons --group-directories-first --git";
|
ls = "eza --long --icons --group-directories-first --git";
|
||||||
lst = "eza --long --icons --color --git --tree";
|
lst = "eza --long --icons --color --git --tree";
|
||||||
rm = "trash";
|
rm = "trash";
|
||||||
|
update = "topgrade";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ in
|
|||||||
"node"
|
"node"
|
||||||
"hyprpm"
|
"hyprpm"
|
||||||
];
|
];
|
||||||
cleanup = true;
|
cleanup = false;
|
||||||
|
notify_end = "never";
|
||||||
|
nix_handle = "nh";
|
||||||
};
|
};
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
|
|||||||
Reference in New Issue
Block a user