MyNixOS website logo
option

services.home-manager.autoUpgrade.preSwitchCommands

Shell commands executed before home-manager switch.

Declarations
Type
list of string
Default
if lib.versionAtLeast config.home.stateVersion "26.05"
   || !config.services.home-manager.autoUpgrade.useFlake
then
  [ ]
else
  [ "nix flake update" ]
Example
[
  "${pkgs.gitMinimal}/bin/git pull"
  "nix flake update"
]