refactor(nixos): move networking config to its own module
This commit is contained in:
parent
b7e9cdf51d
commit
5f71bc8925
3 changed files with 23 additions and 28 deletions
23
modules/nixos/networking/default.nix
Normal file
23
modules/nixos/networking/default.nix
Normal 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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue