refactor(nixos): move networking config to its own module

This commit is contained in:
Mohammad Rafiq 2025-06-16 18:40:02 +08:00
parent b7e9cdf51d
commit 5f71bc8925
No known key found for this signature in database
3 changed files with 23 additions and 28 deletions

View file

@ -0,0 +1,23 @@
{ config, lib, ... }:
let
inherit (lib) mkDefault singleton;
in
{
networking = {
enableIPv6 = false;
useDHCP = mkDefault true;
hostName = config.system.hostname;
networkmanager.enable = true;
};
services.openssh = {
enable = true;
settings.PrintMotd = true;
};
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets."keys/tailscale".path;
};
persistDirs = singleton "/var/lib/tailscale";
}