nixpkgs/lib/tests/modules/doRename-condition-enable.nix
Robert Hensing 29c7665003 lib.modules.doRename: Add condition parameter
This is to support single-to-multi service migrations, so that the
`to` (e.g. `foos.""`) isn't defined unconditionally. See test cases.
2024-02-02 07:31:16 +01:00

11 lines
196 B
Nix

{ config, lib, ... }:
{
config = {
services.foo.enable = true;
services.foo.bar = "baz";
result =
assert config.services.foos == { "" = { bar = "baz"; }; };
true;
};
}