2024-12-08 16:34:34 +08:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
profiles,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-11-28 01:14:34 +08:00
|
|
|
{
|
|
|
|
imports = with profiles; [
|
|
|
|
services.enthalpy
|
|
|
|
];
|
|
|
|
|
|
|
|
services.enthalpy = {
|
|
|
|
ipsec.interfaces = [ "enp14s0" ];
|
2024-12-02 01:18:21 +08:00
|
|
|
clat = {
|
2024-11-28 01:14:34 +08:00
|
|
|
enable = true;
|
2024-12-02 01:18:21 +08:00
|
|
|
segment = lib.singleton "fde3:3be3:a244:2676::2";
|
2024-11-28 01:14:34 +08:00
|
|
|
};
|
2024-12-02 01:18:21 +08:00
|
|
|
gost.enable = true;
|
2024-11-28 01:14:34 +08:00
|
|
|
};
|
|
|
|
|
2024-12-08 16:34:34 +08:00
|
|
|
systemd.services.nix-daemon = {
|
|
|
|
serviceConfig = config.networking.netns.enthalpy.serviceConfig;
|
|
|
|
after = [ "netns-enthalpy.service" ];
|
|
|
|
requires = [ "netns-enthalpy.service" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services."user@${toString config.users.users.rebmit.uid}" = {
|
|
|
|
overrideStrategy = "asDropin";
|
|
|
|
serviceConfig = config.networking.netns.enthalpy.serviceConfig;
|
|
|
|
after = [ "netns-enthalpy.service" ];
|
|
|
|
requires = [ "netns-enthalpy.service" ];
|
|
|
|
};
|
|
|
|
|
2024-11-28 01:14:34 +08:00
|
|
|
systemd.network = {
|
|
|
|
enable = true;
|
|
|
|
wait-online.anyInterface = true;
|
|
|
|
networks = {
|
|
|
|
"30-enp14s0" = {
|
|
|
|
matchConfig.Name = "enp14s0";
|
|
|
|
networkConfig = {
|
|
|
|
DHCP = "yes";
|
|
|
|
IPv6AcceptRA = true;
|
|
|
|
IPv6PrivacyExtensions = true;
|
|
|
|
};
|
|
|
|
dhcpV4Config.RouteMetric = 1024;
|
|
|
|
dhcpV6Config.RouteMetric = 1024;
|
|
|
|
ipv6AcceptRAConfig.RouteMetric = 1024;
|
|
|
|
};
|
|
|
|
"40-wlan0" = {
|
|
|
|
matchConfig.Name = "wlan0";
|
|
|
|
networkConfig = {
|
|
|
|
DHCP = "yes";
|
|
|
|
IPv6AcceptRA = true;
|
|
|
|
IPv6PrivacyExtensions = true;
|
|
|
|
};
|
|
|
|
dhcpV4Config.RouteMetric = 2048;
|
|
|
|
dhcpV6Config.RouteMetric = 2048;
|
|
|
|
ipv6AcceptRAConfig.RouteMetric = 2048;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|