mirror of
https://github.com/ivabus/nixos
synced 2024-11-10 02:25:18 +03:00
14 lines
306 B
Nix
14 lines
306 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 ];
|
|
};
|
|
}
|