Snowfall Lib v2 Migration
Snowfall Lib v2 adds a large amount of features and has made a few breaking changes that are in the benefit of overall user experience. To migrate from v1 to v2, see the following steps.
Namespace
The overlay-package-namespace
option has been removed in favor of using snowfall.namespace
.
inputs.snowfall-lib.mkFlake {
# Before:
# overlay-package-namespace = "my-namespace";
# After:
snowfall.namespace = "my-namespace";
}
In addition, packages and your flake library now default to the internal
namespace.
Aliases
Output aliases are no longer automatically remapped from strings returned from outputs-builder
.
Instead, use the new alias
option to configure aliases.
inputs.snowfall-lib.mkFlake {
# Before:
# outputs-builder = channels: {
# packages.default = "my-package";
# };
# After:
alias.packages.default = "my-package";
}
External Modules
Modules must now be added to a specific system or system type. Previously Snowfall Lib assumed modules were all compatible NixOS modules. This has been extended to also support Darwin modules.
inputs.snowfall-lib.mkFlake {
# Before:
# systems.modules = with inputs; [
# my-input.nixosModules.my-module
# };
# After:
systems.modules.nixos = with inputs; [
my-input.nixosModules.my-module
};
systems.modules.darwin = with inputs; [
my-input.darwinModules.my-module
};
}
lib.snowfall.*
The default arguments for many functions (particularly modules
and system
) have been updated
to support multiple different platforms like Darwin and Home Manager. Please verify that you are
now expecting to use the most recent, new structure imposed by Snowfall Lib.