From 3c19a00aaaa7279afe865a64a5cd176ab24052c3 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sun, 7 Apr 2024 16:08:33 -0700 Subject: [PATCH] chore: minor cleanup --- nixos/dnsmasq.nix | 1 - nixos/reisen-ct/network.nix | 4 ++-- nixos/sops.nix | 7 +------ nixos/tailscale.nix | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/nixos/dnsmasq.nix b/nixos/dnsmasq.nix index 374d32fe..837eded6 100644 --- a/nixos/dnsmasq.nix +++ b/nixos/dnsmasq.nix @@ -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; diff --git a/nixos/reisen-ct/network.nix b/nixos/reisen-ct/network.nix index 85359326..c25c8c70 100644 --- a/nixos/reisen-ct/network.nix +++ b/nixos/reisen-ct/network.nix @@ -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; }; diff --git a/nixos/sops.nix b/nixos/sops.nix index a7b5fea8..dea7d58b 100644 --- a/nixos/sops.nix +++ b/nixos/sops.nix @@ -1,13 +1,8 @@ { - lib, inputs, ... -}: -with lib; { +}: { imports = [ inputs.sops-nix.nixosModules.sops ]; - sops = { - age.sshKeyPaths = mkDefault ["/etc/ssh/ssh_host_ed25519_key"]; - }; } diff --git a/nixos/tailscale.nix b/nixos/tailscale.nix index afa78f04..b6c81fda 100644 --- a/nixos/tailscale.nix +++ b/nixos/tailscale.nix @@ -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";