dotfiles/home-manager/programs/topgrade.nix

30 lines
758 B
Nix
Raw Normal View History

2024-05-18 14:24:03 +02:00
{ config, pkgs, ... }:
2023-05-02 22:47:01 +02:00
2023-11-11 15:20:37 +01:00
let
2024-02-27 02:54:02 +01:00
configPath = if config.machine.isGeneric then
"${config.home.homeDirectory}/.config/home-manager"
else
"${config.home.homeDirectory}/.nixos-config";
2023-11-11 15:20:37 +01:00
in {
2023-05-02 22:47:01 +02:00
programs.topgrade = {
enable = true;
settings = {
2023-07-21 22:50:24 +02:00
misc = {
assume_yes = true;
ignore_failures = [ "git_repos" ];
no_retry = true;
pre_sudo = false;
cleanup = true;
skip_notify = true;
2024-02-27 02:54:02 +01:00
disable = [ "bun" "tldr" "flutter" ];
2023-07-21 22:50:24 +02:00
};
2024-02-27 02:54:02 +01:00
git.repos = [ configPath ];
firmware = { upgrade = true; };
2023-11-11 15:20:37 +01:00
pre_commands = {
2024-02-27 02:54:02 +01:00
flakeUpgrade =
2024-05-18 14:24:03 +02:00
"cd ${configPath} && ${pkgs.nixVersions.latest}/bin/nix flake update --commit-lock-file --verbose --repair";
2023-11-11 15:20:37 +01:00
};
2023-05-02 22:47:01 +02:00
};
};
2023-05-02 22:47:01 +02:00
}