forked from DGNum/liminix
move pppoe service derivation into ppp module dir
This commit is contained in:
parent
c13defc891
commit
df6cfe1cd5
3 changed files with 5 additions and 6 deletions
|
@ -8,7 +8,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
system.service.pppoe = pkgs.liminix.networking.pppoe;
|
system.service.pppoe = pkgs.callPackage ./pppoe.nix {};
|
||||||
kernel = {
|
kernel = {
|
||||||
config = {
|
config = {
|
||||||
PPP = "y";
|
PPP = "y";
|
||||||
|
|
|
@ -9,9 +9,8 @@
|
||||||
let
|
let
|
||||||
inherit (liminix.services) longrun;
|
inherit (liminix.services) longrun;
|
||||||
inherit (liminix.lib) typeChecked;
|
inherit (liminix.lib) typeChecked;
|
||||||
inherit (lib)
|
inherit (lib) mkOption types;
|
||||||
mergeDefinitions
|
|
||||||
mkEnableOption mkOption isType types isDerivation hasAttr;
|
|
||||||
t = {
|
t = {
|
||||||
interface = mkOption {
|
interface = mkOption {
|
||||||
type = liminix.lib.types.service;
|
type = liminix.lib.types.service;
|
||||||
|
@ -19,12 +18,13 @@ let
|
||||||
};
|
};
|
||||||
ppp-options = mkOption {
|
ppp-options = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
|
description = "options supplied on ppp command line";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
params:
|
params:
|
||||||
let
|
let
|
||||||
inherit (typeChecked "pppoe.nix" t params) ppp-options interface;
|
inherit (typeChecked "pppoe.nix" t params) interface ppp-options;
|
||||||
name = "${interface.device}.pppoe";
|
name = "${interface.device}.pppoe";
|
||||||
ip-up = writeAshScript "ip-up" {} ''
|
ip-up = writeAshScript "ip-up" {} ''
|
||||||
. ${serviceFns}
|
. ${serviceFns}
|
|
@ -42,7 +42,6 @@ in {
|
||||||
name = "${interface.device}.odhcp";
|
name = "${interface.device}.odhcp";
|
||||||
run = "odhcpcd ${interface.device}";
|
run = "odhcpcd ${interface.device}";
|
||||||
};
|
};
|
||||||
pppoe = callPackage ./pppoe.nix {};
|
|
||||||
dnsmasq = callPackage ./dnsmasq.nix {};
|
dnsmasq = callPackage ./dnsmasq.nix {};
|
||||||
hostapd = callPackage ./hostapd.nix {};
|
hostapd = callPackage ./hostapd.nix {};
|
||||||
route = { name, target, via, dependencies, dev ? null }:
|
route = { name, target, via, dependencies, dev ? null }:
|
||||||
|
|
Loading…
Reference in a new issue