1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00
home-manager/tests/modules/services/home-manager-auto-upgrade/default.nix
Sami Haahtinen 255b6a0ef2
home-manager-auto-upgrade: add flake support (#8053)
Adds the ability for the auto-upgrade service to update a Nix flake
instead of Nix channels.

This is controlled by a new `useFlake` boolean option. When enabled, the
service will run `nix flake update` in the directory specified by the
`flakeDir` option.

`flakeDir` defaults to the standard Home Manager configuration directory
(`~/.config/home-manager`), making this feature work out-of-the-box for
most users. The path is passed to the upgrade script via an environment
variable in the systemd service unit.
2025-10-26 16:21:41 -05:00

6 lines
230 B
Nix

{ lib, pkgs, ... }:
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
home-manager-auto-upgrade-basic-configuration = ./basic-configuration.nix;
home-manager-auto-upgrade-flake-configuration = ./flake-configuration.nix;
}