Merge pull request #138 from Pacman99/flake-extendModules

nixos-generate: use extendModules for flakes
This commit is contained in:
Jörg Thalheim 2022-03-17 12:45:42 +00:00 committed by GitHub
commit 9f56b704ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,9 +15,9 @@ let
flakeSystem = flake.outputs.packages."${system}".nixosConfigurations."${flakeAttr}" or flake.outputs.nixosConfigurations."${flakeAttr}";
in
if flakeUri != null then
flakeSystem.override (attrs: {
modules = attrs.modules ++ [ module formatConfig ];
})
flakeSystem.extendModules {
modules = [ module formatConfig ];
}
else
import "${toString nixpkgs}/nixos/lib/eval-config.nix" {
inherit system;