1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# Nix side of #ProfileLink: users write { name, url }, the app gets "name,url".
{ lib }:
{
type = lib.types.submodule {
options = {
name = lib.mkOption {
type = lib.types.strMatching "[^,]+";
description = "Display name for the link";
};
url = lib.mkOption {
type = lib.types.str;
description = "URL for the link";
};
};
};
apply = link: "${link.name},${link.url}";
}
|