refactor: move system modules into proper directories
This commit is contained in:
parent
16f28bf227
commit
1989535535
10 changed files with 80 additions and 105 deletions
32
systems/modules/networking.nix
Normal file
32
systems/modules/networking.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ hostname, lib, ... }:
|
||||
{
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
useDHCP = lib.mkDefault true;
|
||||
networkmanager.enable = true;
|
||||
networkmanager.wifi.backend = "iwd";
|
||||
|
||||
# Configures a simple stateful firewall.
|
||||
# By default, it doesn't allow any incoming connections.
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
22 # SSH
|
||||
];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
|
||||
interfaces.enp12s0.wakeOnLan.policy = [
|
||||
"phy"
|
||||
"unicast"
|
||||
"multicast"
|
||||
"broadcast"
|
||||
"arp"
|
||||
"magic"
|
||||
"secureon"
|
||||
];
|
||||
interfaces.enp12s0.wakeOnLan.enable = true;
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue