nixos/modules/network.nix

24 lines
568 B
Nix
Raw Permalink Normal View History

2024-10-06 14:08:00 +00:00
{ config, lib, ... }:
let
cfg = config.snowhawk.network;
in
{
options.snowhawk.network = {
enable = lib.mkEnableOption "network nixos module";
};
config = lib.mkIf cfg.enable {
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.openFirewall = true;
services.avahi.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
};
}