summaryrefslogtreecommitdiffstats
path: root/lib/tests/modules/doRename-warnings.nix
blob: c0150ce4349ce16ba7217ee122d53bf056c5b25a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ lib, config, ... }:
{
  imports = [
    (lib.doRename {
      from = [
        "a"
        "b"
      ];
      to = [
        "c"
        "d"
        "e"
      ];
      warn = true;
      use = x: x;
      visible = true;
    })
  ];
  options = {
    warnings = lib.mkOption { type = lib.types.listOf lib.types.str; };
    c.d.e = lib.mkOption { };
    result = lib.mkOption { };
  };
  config = {
    a.b = 1234;
    result = lib.concatStringsSep "%" config.warnings;
  };
}