From df6cfe1cd5eeea6f0f6d626fc2696ef32a168e25 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Fri, 14 Jul 2023 21:33:56 +0100 Subject: [PATCH] move pppoe service derivation into ppp module dir --- modules/ppp/default.nix | 2 +- {pkgs/liminix-tools/networking => modules/ppp}/pppoe.nix | 8 ++++---- pkgs/liminix-tools/networking/default.nix | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) rename {pkgs/liminix-tools/networking => modules/ppp}/pppoe.nix (88%) diff --git a/modules/ppp/default.nix b/modules/ppp/default.nix index 8dca086..2d08d6a 100644 --- a/modules/ppp/default.nix +++ b/modules/ppp/default.nix @@ -8,7 +8,7 @@ in { }; }; config = { - system.service.pppoe = pkgs.liminix.networking.pppoe; + system.service.pppoe = pkgs.callPackage ./pppoe.nix {}; kernel = { config = { PPP = "y"; diff --git a/pkgs/liminix-tools/networking/pppoe.nix b/modules/ppp/pppoe.nix similarity index 88% rename from pkgs/liminix-tools/networking/pppoe.nix rename to modules/ppp/pppoe.nix index bb30648..c7ceead 100644 --- a/pkgs/liminix-tools/networking/pppoe.nix +++ b/modules/ppp/pppoe.nix @@ -9,9 +9,8 @@ let inherit (liminix.services) longrun; inherit (liminix.lib) typeChecked; - inherit (lib) - mergeDefinitions - mkEnableOption mkOption isType types isDerivation hasAttr; + inherit (lib) mkOption types; + t = { interface = mkOption { type = liminix.lib.types.service; @@ -19,12 +18,13 @@ let }; ppp-options = mkOption { type = types.listOf types.str; + description = "options supplied on ppp command line"; }; }; in params: let - inherit (typeChecked "pppoe.nix" t params) ppp-options interface; + inherit (typeChecked "pppoe.nix" t params) interface ppp-options; name = "${interface.device}.pppoe"; ip-up = writeAshScript "ip-up" {} '' . ${serviceFns} diff --git a/pkgs/liminix-tools/networking/default.nix b/pkgs/liminix-tools/networking/default.nix index 6080ad7..84f4689 100644 --- a/pkgs/liminix-tools/networking/default.nix +++ b/pkgs/liminix-tools/networking/default.nix @@ -42,7 +42,6 @@ in { name = "${interface.device}.odhcp"; run = "odhcpcd ${interface.device}"; }; - pppoe = callPackage ./pppoe.nix {}; dnsmasq = callPackage ./dnsmasq.nix {}; hostapd = callPackage ./hostapd.nix {}; route = { name, target, via, dependencies, dev ? null }: