convert pppoe to serviceDefn

This commit is contained in:
Daniel Barlow
2023-08-10 22:53:45 +01:00
parent 2942c465b9
commit 3ea40f95dc
3 changed files with 14 additions and 21 deletions

View File

@@ -6,25 +6,9 @@
, writeAshScript
, serviceFns
} :
{ interface, ppp-options }:
let
inherit (liminix.services) longrun;
inherit (liminix.lib) typeChecked;
inherit (lib) mkOption types;
t = {
interface = mkOption {
type = liminix.lib.types.service;
description = "ethernet interface to run PPPoE over";
};
ppp-options = mkOption {
type = types.listOf types.str;
description = "options supplied on ppp command line";
};
};
in
params:
let
inherit (typeChecked "pppoe.nix" t params) interface ppp-options;
name = "${interface.device}.pppoe";
ip-up = writeAshScript "ip-up" {} ''
. ${serviceFns}
@@ -55,7 +39,6 @@ let
"usepeerdns"
"logfd" "2"
];
in
longrun {
inherit name;