From df395a4d5da80d6f89257ed921674bff434367c6 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Mon, 15 Jul 2024 19:00:08 +0100 Subject: [PATCH] finish moving pkgs.linimix.callService to config.system --- doc/configuration.rst | 2 +- modules/bridge/default.nix | 2 +- modules/dhcp6c/default.nix | 6 +++--- modules/dnsmasq/default.nix | 2 +- modules/firewall/default.nix | 2 +- modules/hostapd/default.nix | 2 +- modules/network/default.nix | 10 +++++----- modules/ntp/default.nix | 2 +- modules/ppp/default.nix | 4 ++-- modules/service-trigger/default.nix | 2 +- modules/ssh/default.nix | 2 +- modules/vlan/default.nix | 2 +- modules/watchdog/default.nix | 2 +- modules/zyxel-dual-image/default.nix | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 3f87850..32f7550 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -174,7 +174,7 @@ To expose a service template in a module, it needs the following: .. code-block:: nix - config.system.service.cowsay = liminix.callService ./service.nix { + config.system.service.cowsay = config.system.callService ./service.nix { address = mkOption { type = types.str; default = "0.0.0.0"; diff --git a/modules/bridge/default.nix b/modules/bridge/default.nix index 7e68a51..8e67440 100644 --- a/modules/bridge/default.nix +++ b/modules/bridge/default.nix @@ -22,7 +22,7 @@ in }; }; config.system.service.bridge = { - primary = liminix.callService ./primary.nix { + primary = config.system.callService ./primary.nix { ifname = mkOption { type = types.str; description = "bridge interface name to create"; diff --git a/modules/dhcp6c/default.nix b/modules/dhcp6c/default.nix index 11b32fd..05b6586 100644 --- a/modules/dhcp6c/default.nix +++ b/modules/dhcp6c/default.nix @@ -23,13 +23,13 @@ in }; }; config.system.service.dhcp6c = { - client = liminix.callService ./client.nix { + client = config.system.callService ./client.nix { interface = mkOption { type = liminix.lib.types.interface; description = "interface (usually WAN) to query for DHCP6"; }; }; - address = liminix.callService ./address.nix { + address = config.system.callService ./address.nix { client = mkOption { type = types.anything; # liminix.lib.types.service; }; @@ -38,7 +38,7 @@ in description = "interface to assign the address to"; }; }; - prefix = liminix.callService ./prefix.nix { + prefix = config.system.callService ./prefix.nix { client = mkOption { type = types.anything; # liminix.lib.types.service; }; diff --git a/modules/dnsmasq/default.nix b/modules/dnsmasq/default.nix index 9b4bb3c..d453811 100644 --- a/modules/dnsmasq/default.nix +++ b/modules/dnsmasq/default.nix @@ -16,7 +16,7 @@ in { }; }; config = { - system.service.dnsmasq = liminix.callService ./service.nix { + system.service.dnsmasq = config.system.callService ./service.nix { user = mkOption { type = types.str; default = "dnsmasq"; diff --git a/modules/firewall/default.nix b/modules/firewall/default.nix index 50f7907..539eba5 100644 --- a/modules/firewall/default.nix +++ b/modules/firewall/default.nix @@ -54,7 +54,7 @@ in }; config = { system.service.firewall = - let svc = liminix.callService ./service.nix { + let svc = config.system.callService ./service.nix { extraRules = mkOption { type = types.attrsOf types.attrs; description = "firewall ruleset"; diff --git a/modules/hostapd/default.nix b/modules/hostapd/default.nix index 2bcf4d6..02703a0 100644 --- a/modules/hostapd/default.nix +++ b/modules/hostapd/default.nix @@ -22,7 +22,7 @@ in { }; }; config = { - system.service.hostapd = liminix.callService ./service.nix { + system.service.hostapd = config.system.callService ./service.nix { interface = mkOption { type = liminix.lib.types.service; }; diff --git a/modules/network/default.nix b/modules/network/default.nix index 73650e4..73701c2 100644 --- a/modules/network/default.nix +++ b/modules/network/default.nix @@ -64,7 +64,7 @@ in { services.loopback = config.hardware.networkInterfaces.lo; system.service.network = { - link = liminix.callService ./link.nix { + link = config.system.callService ./link.nix { ifname = mkOption { type = types.str; example = "eth0"; @@ -89,7 +89,7 @@ in { example = 1480; }; }; - address = liminix.callService ./address.nix { + address = config.system.callService ./address.nix { interface = mkOption { type = liminix.lib.types.service; }; @@ -104,7 +104,7 @@ in { }; }; - route = liminix.callService ./route.nix { + route = config.system.callService ./route.nix { interface = mkOption { type = types.nullOr liminix.lib.types.interface; default = null; @@ -125,7 +125,7 @@ in { }; }; - forward = liminix.callService ./forward.nix { + forward = config.system.callService ./forward.nix { enableIPv4 = mkOption { type = types.bool; default = true; @@ -136,7 +136,7 @@ in { }; }; - dhcp.client = liminix.callService ./dhcpc.nix { + dhcp.client = config.system.callService ./dhcpc.nix { interface = mkOption { type = liminix.lib.types.service; }; diff --git a/modules/ntp/default.nix b/modules/ntp/default.nix index c6c9480..6d51c2d 100644 --- a/modules/ntp/default.nix +++ b/modules/ntp/default.nix @@ -18,7 +18,7 @@ in { }; }; config = { - system.service.ntp = liminix.callService ./service.nix { + system.service.ntp = config.system.callService ./service.nix { user = mkOption { type = types.str; default = "ntp"; diff --git a/modules/ppp/default.nix b/modules/ppp/default.nix index 4806e54..086fca9 100644 --- a/modules/ppp/default.nix +++ b/modules/ppp/default.nix @@ -22,7 +22,7 @@ in { }; }; config = { - system.service.pppoe = pkgs.liminix.callService ./pppoe.nix { + system.service.pppoe = config.system.callService ./pppoe.nix { interface = mkOption { type = liminix.lib.types.service; description = "ethernet interface to run PPPoE over"; @@ -32,7 +32,7 @@ in { description = "options supplied on ppp command line"; }; }; - system.service.l2tp = pkgs.liminix.callService ./l2tp.nix { + system.service.l2tp = config.system.callService ./l2tp.nix { lns = mkOption { type = types.str; description = "hostname or address of the L2TP network server"; diff --git a/modules/service-trigger/default.nix b/modules/service-trigger/default.nix index 3bed214..56faad1 100644 --- a/modules/service-trigger/default.nix +++ b/modules/service-trigger/default.nix @@ -14,7 +14,7 @@ in { }; }; config = { - system.service.uevent-rule = liminix.callService ./rule.nix { + system.service.uevent-rule = config.system.callService ./rule.nix { serviceName = mkOption { description = "name of the service to run when the rule matches"; type = types.str; diff --git a/modules/ssh/default.nix b/modules/ssh/default.nix index cb1305f..8feff85 100644 --- a/modules/ssh/default.nix +++ b/modules/ssh/default.nix @@ -20,7 +20,7 @@ in { }; }; config.system.service = { - ssh = liminix.callService ./ssh.nix { + ssh = config.system.callService ./ssh.nix { address = mkOption { type = types.nullOr types.str; default = null; diff --git a/modules/vlan/default.nix b/modules/vlan/default.nix index 2884d7a..a0fa212 100644 --- a/modules/vlan/default.nix +++ b/modules/vlan/default.nix @@ -19,7 +19,7 @@ in options = { system.service.vlan = mkOption { type = liminix.lib.types.serviceDefn; }; }; - config.system.service.vlan = liminix.callService ./service.nix { + config.system.service.vlan = config.system.callService ./service.nix { ifname = mkOption { type = types.str; description = "interface name to create"; diff --git a/modules/watchdog/default.nix b/modules/watchdog/default.nix index d947954..e654522 100644 --- a/modules/watchdog/default.nix +++ b/modules/watchdog/default.nix @@ -15,7 +15,7 @@ in type = liminix.lib.types.serviceDefn; }; }; - config.system.service.watchdog = liminix.callService ./watchdog.nix { + config.system.service.watchdog = config.system.callService ./watchdog.nix { watched = mkOption { description = "services to watch"; type = types.listOf liminix.lib.types.service; diff --git a/modules/zyxel-dual-image/default.nix b/modules/zyxel-dual-image/default.nix index 91ed48e..1b2c2e2 100644 --- a/modules/zyxel-dual-image/default.nix +++ b/modules/zyxel-dual-image/default.nix @@ -20,7 +20,7 @@ in type = liminix.lib.types.serviceDefn; }; - config.boot.zyxel-dual-image = liminix.callService ./service.nix { + config.boot.zyxel-dual-image = config.system.callService ./service.nix { ensureActiveImage = mkOption { type = types.enum [ "primary" "secondary" ]; default = "primary";