chore: minor cleanup

This commit is contained in:
arcnmx 2024-04-07 16:08:33 -07:00
parent 3a2927a12f
commit 3c19a00aaa
4 changed files with 4 additions and 10 deletions

View file

@ -4,7 +4,6 @@
inputs,
...
}: let
inherit (inputs.self.lib) generate;
inherit (lib.options) mkOption;
inherit (lib.modules) mkIf mkBefore mkDefault mkForce;
inherit (lib.attrsets) filterAttrs mapAttrsToList nameValuePair listToAttrs;

View file

@ -18,11 +18,11 @@ in {
#services.resolved.enable = mkIf enableDns false;
systemd.services.avahi-daemon = mkIf (options ? proxmoxLXC && config.services.avahi.enable) {
serviceConfig.ExecStartPre = mkIf config.services.resolved.enable [
"+-${config.systemd.package}/bin/resolvectl mdns eth0 yes"
"+-${config.systemd.package}/bin/resolvectl mdns ${config.systemd.network.networks.eth0.name or "eth0"} yes"
];
};
systemd.network.networks.eth0 = mkIf (! options ? proxmoxLXC) {
matchConfig.Name = "eth0";
name = "eth0";
linkConfig.Multicast = true;
networkConfig.MulticastDNS = true;
};

View file

@ -1,13 +1,8 @@
{
lib,
inputs,
...
}:
with lib; {
}: {
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
age.sshKeyPaths = mkDefault ["/etc/ssh/ssh_host_ed25519_key"];
};
}

View file

@ -48,7 +48,7 @@ in {
'';
# https://tailscale.com/kb/1320/performance-best-practices#ethtool-configuration
exitNodeRouting = optionalString cfg.advertiseExitNode ''
netdev=$(${pkgs.iproute2}/bin/ip route show 0/0 | ${pkgs.coreutils}/bin/cut -f5 -d' ' || echo eth0)
netdev=$(${pkgs.iproute2}/bin/ip route show 0/0 | ${pkgs.coreutils}/bin/cut -f5 -d' ' || echo ${config.systemd.network.networks.eth0.name or "eth0"})
${getExe pkgs.ethtool} -K "$netdev" rx-udp-gro-forwarding on rx-gro-list off || true
'';
advertiseExitNode = "--advertise-exit-node" + optionalString (!cfg.advertiseExitNode) "=false";