accept attr args to pppoe service, and typecheck them

We use (abuse, arguably) the nixos module system for typechecking.  Un
the plus side, it gives us documentation of the options and their
expected types. On the downside, the error message doesn't tell us
the file in which the error was encountered.

(This is subject to change, if I can find a better way)
This commit is contained in:
Daniel Barlow 2023-07-14 16:53:36 +01:00
parent 9441f48819
commit 69e6eb5a89
3 changed files with 21 additions and 7 deletions

View file

@ -6,7 +6,7 @@ let
in {
options = {
system.service.pppoe = mkOption {
type = types.functionTo (types.functionTo types.package);
type = types.functionTo types.package;
};
};
config = {