services.home-manager.autoExpire.enable
Whether to enable the Home Manager expire service that periodically expire your old Home Manager generations.
Type: boolean
Default:
false
Example:
true
Declared by:
services.home-manager.autoExpire.frequency
The interval at which the Home Manager auto expire is run.
This value is passed to the systemd timer configuration
as the OnCalendar option.
The format is described in systemd.time(7).
On Darwin, it must be one of: hourly, daily, weekly, monthly, semiannually, annually, which are implemented as defined in systemd.time(7).
Type: string
Default:
"monthly"
Example:
"weekly"
Declared by:
services.home-manager.autoExpire.store.cleanup
Whether to enable to cleanup Nix store when the Home Manager expire service runs.
It will use nix-collect-garbage to cleanup the store,
removing all unreachable store objects from the current user
(i.e.: not only the expired Home Manager generations).
This may not be what you want, this is why this option is disabled by default.
Type: boolean
Default:
false
Example:
true
Declared by:
services.home-manager.autoExpire.store.options
Options given to nix-collect-garbage when the service runs.
Type: string
Default:
""
Example:
"--delete-older-than 30d"
Declared by:
services.home-manager.autoExpire.timestamp
Remove generations older than TIMESTAMP where TIMESTAMP is
interpreted as in the -d argument of the date tool.
Type: string
Default:
"-30 days"
Example:
"-7 days"
Declared by:
services.home-manager.autoUpgrade.enable
Whether to enable the Home Manager upgrade service that periodically updates your Nix
configuration by running home-manager switch
.
Type: boolean
Default:
false
Example:
true
Declared by:
services.home-manager.autoUpgrade.flags
Extra arguments passed to home-manager switch.
Type: list of string
Default:
[ ]
Example:
[
"--impure"
"-b"
"hmbak"
]
Declared by:
services.home-manager.autoUpgrade.flakeDir
Directory containing flake.nix.
Also check services.home-manager.autoUpgrade.useFlake option.
Type: string
Default:
"${config.xdg.configHome}/home-manager"
Example:
"/home/user/dotfiles"
Declared by:
services.home-manager.autoUpgrade.frequency
The interval at which the Home Manager auto upgrade is run.
This value is passed to the systemd timer configuration
as the OnCalendar option.
The format is described in systemd.time(7).
Type: string
Example:
"weekly"
Declared by:
services.home-manager.autoUpgrade.preSwitchCommands
Shell commands executed before home-manager switch.
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"
]
Declared by:
services.home-manager.autoUpgrade.useFlake
Whether to use flake-based Home Manager configuration.
Flake URI uses FQDN, long, and short hostnames, and you must configure the corresponding user@host key in homeConfigurations. For example: user@hostname or user@host.example.com.
Also check services.home-manager.autoUpgrade.flakeDir option.
Type: boolean
Default:
false
Declared by: