nixos/roles/ntp-server.nix
Ivan Bushchik 9de8497113
Call nixfmt for the first time
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2023-09-06 16:10:11 +03:00

12 lines
319 B
Nix

{ config, pkgs, lib, ... }:
let cfg = config.my.roles.ntp-server;
in {
options.my.roles.ntp-server.enable = lib.mkEnableOption "Enable NTP server";
config = lib.mkIf (cfg.enable) {
services.chrony.extraConfig = ''
allow 192.168.0.0/16
'';
networking.firewall.allowedUDPPorts = [ 123 ];
};
}