change output references from attrset to lambda
this is so that we can distinguish a ref from a literal parameter that might be a attrset
This commit is contained in:
@@ -30,7 +30,7 @@ let
|
||||
literal_or_output = o: ({
|
||||
string = builtins.toJSON;
|
||||
int = builtins.toJSON;
|
||||
set = (o: "output(${builtins.toJSON o.service}, ${builtins.toJSON o.path})");
|
||||
lambda = (o: "output(${builtins.toJSON (o "service")}, ${builtins.toJSON (o "path")})");
|
||||
}.${builtins.typeOf o}) o;
|
||||
|
||||
conf =
|
||||
|
@@ -40,12 +40,12 @@ in {
|
||||
description = "ethernet interface to run PPPoE over";
|
||||
};
|
||||
username = mkOption {
|
||||
type = types.nullOr liminix.lib.types.replacable;
|
||||
type = types.nullOr (liminix.lib.types.replacable types.str);
|
||||
default = null;
|
||||
description = "username";
|
||||
};
|
||||
password = mkOption {
|
||||
type = types.nullOr liminix.lib.types.replacable;
|
||||
type = types.nullOr (liminix.lib.types.replacable types.str);
|
||||
default = null;
|
||||
description = "password";
|
||||
};
|
||||
@@ -83,12 +83,12 @@ in {
|
||||
description = "hostname or address of the L2TP network server";
|
||||
};
|
||||
username = mkOption {
|
||||
type = types.nullOr liminix.lib.types.replacable;
|
||||
type = types.nullOr (liminix.lib.types.replacable types.str);
|
||||
default = null;
|
||||
description = "username";
|
||||
};
|
||||
password = mkOption {
|
||||
type = types.nullOr liminix.lib.types.replacable;
|
||||
type = types.nullOr (liminix.lib.types.replacable types.str);
|
||||
default = null;
|
||||
description = "password";
|
||||
};
|
||||
@@ -116,6 +116,7 @@ in {
|
||||
};
|
||||
ppp-options = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = "options supplied on ppp command line";
|
||||
};
|
||||
};
|
||||
|
@@ -44,7 +44,7 @@ let
|
||||
let v = o: ({
|
||||
string = builtins.toJSON;
|
||||
int = builtins.toJSON;
|
||||
set = (o: "output(${builtins.toJSON o.service}, ${builtins.toJSON o.path})");
|
||||
lambda = (o: "output(${builtins.toJSON (o "service")}, ${builtins.toJSON (o "path")})");
|
||||
}.${builtins.typeOf o}) o;
|
||||
in o: "{{ ${v o} }}";
|
||||
|
||||
|
@@ -44,7 +44,7 @@ let
|
||||
let v = o: ({
|
||||
string = builtins.toJSON;
|
||||
int = builtins.toJSON;
|
||||
set = (o: "output(${builtins.toJSON o.service}, ${builtins.toJSON o.path})");
|
||||
lambda = (o: "output(${builtins.toJSON (o "service")}, ${builtins.toJSON (o "path")})");
|
||||
}.${builtins.typeOf o}) o;
|
||||
in o: "{{ ${v o} }}";
|
||||
ppp-options' =
|
||||
|
Reference in New Issue
Block a user