dotfiles/home-manager/programs/topgrade.nix

38 lines
825 B
Nix
Raw Normal View History

2024-05-28 14:38:22 +02:00
{ config, pkgs, ... }:
2023-05-02 22:47:01 +02:00
2023-11-11 15:20:37 +01:00
let
2024-05-28 14:38:22 +02:00
configPath =
if config.machine.isGeneric then
"${config.home.homeDirectory}/.config/home-manager"
else
"${config.home.homeDirectory}/.nixos-config";
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-05-28 14:38:22 +02:00
disable = [
"bun"
"tldr"
"flutter"
"nix"
2024-05-28 14:38:22 +02:00
];
2023-07-21 22:50:24 +02:00
};
2024-02-27 02:54:02 +01:00
git.repos = [ configPath ];
2024-05-28 14:38:22 +02:00
firmware = {
upgrade = true;
};
2023-11-11 15:20:37 +01:00
pre_commands = {
2024-05-28 14:38:22 +02:00
flakeUpgrade = "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
}