move dhcp6 client to profile
This commit is contained in:
parent
90302f0944
commit
d3fd6f5c0a
|
@ -150,26 +150,6 @@ in rec {
|
||||||
in lib.recursiveUpdate defaults secrets.firewallRules;
|
in lib.recursiveUpdate defaults secrets.firewallRules;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.packet_forwarding = svc.network.forward.build { };
|
|
||||||
|
|
||||||
services.dhcp6c =
|
|
||||||
let client = svc.dhcp6c.client.build {
|
|
||||||
interface = config.services.wan;
|
|
||||||
};
|
|
||||||
in bundle {
|
|
||||||
name = "dhcp6c";
|
|
||||||
contents = [
|
|
||||||
(svc.dhcp6c.prefix.build {
|
|
||||||
inherit client;
|
|
||||||
interface = config.services.int;
|
|
||||||
})
|
|
||||||
(svc.dhcp6c.address.build {
|
|
||||||
inherit client;
|
|
||||||
interface = config.services.wan;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultProfile.packages = with pkgs; [
|
defaultProfile.packages = with pkgs; [
|
||||||
min-collect-garbage
|
min-collect-garbage
|
||||||
nftables
|
nftables
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
let
|
let
|
||||||
svc = config.system.service;
|
svc = config.system.service;
|
||||||
cfg = config.profile.gateway;
|
cfg = config.profile.gateway;
|
||||||
inherit (lib) mkOption mkEnableOption mdDoc types optional optionals;
|
inherit (lib) mkOption mkEnableOption mkIf mdDoc types optional optionals;
|
||||||
inherit (pkgs) liminix;
|
inherit (pkgs) liminix;
|
||||||
|
inherit (liminix.services) bundle oneshot;
|
||||||
hostaps =
|
hostaps =
|
||||||
let
|
let
|
||||||
defaults = {
|
defaults = {
|
||||||
|
@ -73,7 +74,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
services.wan = svc.pppoe.build {
|
services.wan = svc.pppoe.build {
|
||||||
interface = config.hardware.networkInterfaces.wan;
|
inherit (cfg.wan) interface;
|
||||||
ppp-options = [
|
ppp-options = [
|
||||||
"debug" "+ipv6" "noauth"
|
"debug" "+ipv6" "noauth"
|
||||||
"name" cfg.wan.username
|
"name" cfg.wan.username
|
||||||
|
@ -81,6 +82,27 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.packet_forwarding = svc.network.forward.build { };
|
||||||
|
|
||||||
|
services.dhcp6c =
|
||||||
|
let
|
||||||
|
client = svc.dhcp6c.client.build {
|
||||||
|
interface = config.services.wan;
|
||||||
|
};
|
||||||
|
bundl = bundle {
|
||||||
|
name = "dhcp6c";
|
||||||
|
contents = [
|
||||||
|
(svc.dhcp6c.prefix.build {
|
||||||
|
inherit client;
|
||||||
|
interface = config.services.int;
|
||||||
|
})
|
||||||
|
(svc.dhcp6c.address.build {
|
||||||
|
inherit client;
|
||||||
|
interface = config.services.wan;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in mkIf cfg.wan.dhcp6.enable bundl;
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.dns =
|
# services.dns =
|
||||||
|
|
Loading…
Reference in New Issue