1
0
Fork 0

finish moving pkgs.linimix.callService to config.system

This commit is contained in:
Daniel Barlow 2024-07-15 19:00:08 +01:00
parent 75e9f8210c
commit df395a4d5d
14 changed files with 21 additions and 21 deletions

View File

@ -174,7 +174,7 @@ To expose a service template in a module, it needs the following:
.. code-block:: nix .. code-block:: nix
config.system.service.cowsay = liminix.callService ./service.nix { config.system.service.cowsay = config.system.callService ./service.nix {
address = mkOption { address = mkOption {
type = types.str; type = types.str;
default = "0.0.0.0"; default = "0.0.0.0";

View File

@ -22,7 +22,7 @@ in
}; };
}; };
config.system.service.bridge = { config.system.service.bridge = {
primary = liminix.callService ./primary.nix { primary = config.system.callService ./primary.nix {
ifname = mkOption { ifname = mkOption {
type = types.str; type = types.str;
description = "bridge interface name to create"; description = "bridge interface name to create";

View File

@ -23,13 +23,13 @@ in
}; };
}; };
config.system.service.dhcp6c = { config.system.service.dhcp6c = {
client = liminix.callService ./client.nix { client = config.system.callService ./client.nix {
interface = mkOption { interface = mkOption {
type = liminix.lib.types.interface; type = liminix.lib.types.interface;
description = "interface (usually WAN) to query for DHCP6"; description = "interface (usually WAN) to query for DHCP6";
}; };
}; };
address = liminix.callService ./address.nix { address = config.system.callService ./address.nix {
client = mkOption { client = mkOption {
type = types.anything; # liminix.lib.types.service; type = types.anything; # liminix.lib.types.service;
}; };
@ -38,7 +38,7 @@ in
description = "interface to assign the address to"; description = "interface to assign the address to";
}; };
}; };
prefix = liminix.callService ./prefix.nix { prefix = config.system.callService ./prefix.nix {
client = mkOption { client = mkOption {
type = types.anything; # liminix.lib.types.service; type = types.anything; # liminix.lib.types.service;
}; };

View File

@ -16,7 +16,7 @@ in {
}; };
}; };
config = { config = {
system.service.dnsmasq = liminix.callService ./service.nix { system.service.dnsmasq = config.system.callService ./service.nix {
user = mkOption { user = mkOption {
type = types.str; type = types.str;
default = "dnsmasq"; default = "dnsmasq";

View File

@ -54,7 +54,7 @@ in
}; };
config = { config = {
system.service.firewall = system.service.firewall =
let svc = liminix.callService ./service.nix { let svc = config.system.callService ./service.nix {
extraRules = mkOption { extraRules = mkOption {
type = types.attrsOf types.attrs; type = types.attrsOf types.attrs;
description = "firewall ruleset"; description = "firewall ruleset";

View File

@ -22,7 +22,7 @@ in {
}; };
}; };
config = { config = {
system.service.hostapd = liminix.callService ./service.nix { system.service.hostapd = config.system.callService ./service.nix {
interface = mkOption { interface = mkOption {
type = liminix.lib.types.service; type = liminix.lib.types.service;
}; };

View File

@ -64,7 +64,7 @@ in {
services.loopback = config.hardware.networkInterfaces.lo; services.loopback = config.hardware.networkInterfaces.lo;
system.service.network = { system.service.network = {
link = liminix.callService ./link.nix { link = config.system.callService ./link.nix {
ifname = mkOption { ifname = mkOption {
type = types.str; type = types.str;
example = "eth0"; example = "eth0";
@ -89,7 +89,7 @@ in {
example = 1480; example = 1480;
}; };
}; };
address = liminix.callService ./address.nix { address = config.system.callService ./address.nix {
interface = mkOption { interface = mkOption {
type = liminix.lib.types.service; type = liminix.lib.types.service;
}; };
@ -104,7 +104,7 @@ in {
}; };
}; };
route = liminix.callService ./route.nix { route = config.system.callService ./route.nix {
interface = mkOption { interface = mkOption {
type = types.nullOr liminix.lib.types.interface; type = types.nullOr liminix.lib.types.interface;
default = null; default = null;
@ -125,7 +125,7 @@ in {
}; };
}; };
forward = liminix.callService ./forward.nix { forward = config.system.callService ./forward.nix {
enableIPv4 = mkOption { enableIPv4 = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
@ -136,7 +136,7 @@ in {
}; };
}; };
dhcp.client = liminix.callService ./dhcpc.nix { dhcp.client = config.system.callService ./dhcpc.nix {
interface = mkOption { interface = mkOption {
type = liminix.lib.types.service; type = liminix.lib.types.service;
}; };

View File

@ -18,7 +18,7 @@ in {
}; };
}; };
config = { config = {
system.service.ntp = liminix.callService ./service.nix { system.service.ntp = config.system.callService ./service.nix {
user = mkOption { user = mkOption {
type = types.str; type = types.str;
default = "ntp"; default = "ntp";

View File

@ -22,7 +22,7 @@ in {
}; };
}; };
config = { config = {
system.service.pppoe = pkgs.liminix.callService ./pppoe.nix { system.service.pppoe = config.system.callService ./pppoe.nix {
interface = mkOption { interface = mkOption {
type = liminix.lib.types.service; type = liminix.lib.types.service;
description = "ethernet interface to run PPPoE over"; description = "ethernet interface to run PPPoE over";
@ -32,7 +32,7 @@ in {
description = "options supplied on ppp command line"; 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 { lns = mkOption {
type = types.str; type = types.str;
description = "hostname or address of the L2TP network server"; description = "hostname or address of the L2TP network server";

View File

@ -14,7 +14,7 @@ in {
}; };
}; };
config = { config = {
system.service.uevent-rule = liminix.callService ./rule.nix { system.service.uevent-rule = config.system.callService ./rule.nix {
serviceName = mkOption { serviceName = mkOption {
description = "name of the service to run when the rule matches"; description = "name of the service to run when the rule matches";
type = types.str; type = types.str;

View File

@ -20,7 +20,7 @@ in {
}; };
}; };
config.system.service = { config.system.service = {
ssh = liminix.callService ./ssh.nix { ssh = config.system.callService ./ssh.nix {
address = mkOption { address = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;

View File

@ -19,7 +19,7 @@ in
options = { options = {
system.service.vlan = mkOption { type = liminix.lib.types.serviceDefn; }; 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 { ifname = mkOption {
type = types.str; type = types.str;
description = "interface name to create"; description = "interface name to create";

View File

@ -15,7 +15,7 @@ in
type = liminix.lib.types.serviceDefn; type = liminix.lib.types.serviceDefn;
}; };
}; };
config.system.service.watchdog = liminix.callService ./watchdog.nix { config.system.service.watchdog = config.system.callService ./watchdog.nix {
watched = mkOption { watched = mkOption {
description = "services to watch"; description = "services to watch";
type = types.listOf liminix.lib.types.service; type = types.listOf liminix.lib.types.service;

View File

@ -20,7 +20,7 @@ in
type = liminix.lib.types.serviceDefn; 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 { ensureActiveImage = mkOption {
type = types.enum [ "primary" "secondary" ]; type = types.enum [ "primary" "secondary" ];
default = "primary"; default = "primary";