mirror of
https://github.com/nix-community/home-manager
synced 2024-11-19 17:49:45 +01:00
609370699f
Currently, the `buildNews` and `doBuildAttrs` are always called unconditionally even if a flake configuration is specified. This cause it to always fail prior to the actual build performed by `doBuildAttrs` because `setConfigFIle` can not find the home-manager configuration file. As a result, an error message specifying no configuration file is shown. Furthermore, if a user has remnant legacy configuration, the `doSwitch` and `doBuild` functions will effectively build the activationPackage twice, with the legacy configuration overriding the flake configuration. A conditional check for FLAKE_CONFIG_URI was added to mitigate this by building the legacy configuration when no flake configuration is present. There is one exception which is when a flake configuration exists in the default location, where the user can not build the legacy configuration as along as the file is present. However, the tradeoff is acceptable as it matches current behavior when FLAKe_CONFIG_URI is set for instantiation, and an user is unlikely to simulataneously switch between the two mechanisms. An abstract function for building flakes `doBuildFlake` was created to match `doBuildAttrs` for manageing options and build flags. The --no-write-lock-file flag was removed from the --debug case as it is already matched previously at the --recreate-lock-file case. |
||
---|---|---|
.. | ||
completion.bash | ||
completion.fish | ||
completion.zsh | ||
default.nix | ||
home-manager | ||
home-manager.nix | ||
install.nix |