nixos/modules/network.nix

24 lines
568 B
Nix

{ 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;
};
}