1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-19 17:49:45 +01:00
home-manager/home-manager
polykernel 609370699f
home-manager: do not build news when using flake (#2501)
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.
2021-11-24 19:09:53 -05:00
..
completion.bash home-manager: add command line argument --impure 2021-08-19 00:07:49 +02:00
completion.fish home-manager: add command line argument --impure 2021-08-19 00:07:49 +02:00
completion.zsh home-manager: add command line argument --impure 2021-08-19 00:07:49 +02:00
default.nix Remove remaining allowSubstitutes = false 2021-11-12 23:24:08 +01:00
home-manager home-manager: do not build news when using flake (#2501) 2021-11-24 19:09:53 -05:00
home-manager.nix home-manager: remove top-level with pkgs.lib 2021-10-31 08:50:55 +01:00
install.nix home-manager: minor reorder of generated home.nix 2021-11-14 00:13:53 +01:00