mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-06-05 17:00:12 +02:00
chore: state before home update
This commit is contained in:
1
home.nix
1
home.nix
@@ -42,6 +42,7 @@
|
||||
./modules/cli/git.nix
|
||||
./modules/cli/fastfetch.nix
|
||||
./modules/cli/kdeconnect.nix
|
||||
./modules/cli/topgrade.nix
|
||||
# gui tools
|
||||
./modules/gui/kitty.nix
|
||||
./modules/gui/satty.nix
|
||||
|
||||
47
modules/cli/topgrade.nix
Normal file
47
modules/cli/topgrade.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
system_path = "/etc/nixos";
|
||||
home_path = "~/.config/home-manager/";
|
||||
in
|
||||
{
|
||||
programs.topgrade = {
|
||||
enable = true;
|
||||
settings = {
|
||||
misc = {
|
||||
assume_yes = true;
|
||||
disable = [
|
||||
"flutter"
|
||||
"node"
|
||||
];
|
||||
cleanup = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
repos = [ "$XDG_PROJECTS_DIR/*" ];
|
||||
};
|
||||
|
||||
pre_commands = {
|
||||
"Git commit before system flake update" =
|
||||
"cd ${system_path} && git add -A && git commit -m 'chore: state before system update'";
|
||||
"Git commit before home flake update" =
|
||||
"cd ${home_path} && git add -A && git commit -m 'chore: state before home update'";
|
||||
};
|
||||
|
||||
commands = {
|
||||
"Update system flake" = "cd ${system_path} && nix flake update";
|
||||
"Update home flake" = "cd ${home_path} && nix flake update";
|
||||
};
|
||||
|
||||
post_commands = {
|
||||
"Git commit after system flake update" =
|
||||
"cd ${system_path} && git add -A && git commit -m 'chore: state after system update'";
|
||||
"Git commit after home flake update" =
|
||||
"cd ${home_path} && git add -A && git commit -m 'chore: state after home update'";
|
||||
"Git push system configuration" = "cd ${system_path} && git push";
|
||||
"Git push home configuration" = "cd ${home_path} && git push";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user