Add chrony module
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m49s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m49s
This commit is contained in:
@ -34,6 +34,7 @@
|
|||||||
./security/gpg.nix
|
./security/gpg.nix
|
||||||
./security/pass.nix
|
./security/pass.nix
|
||||||
./services/borgmatic
|
./services/borgmatic
|
||||||
|
./services/chrony
|
||||||
./services/coturn
|
./services/coturn
|
||||||
./services/gitea
|
./services/gitea
|
||||||
./services/gitea-runner
|
./services/gitea-runner
|
||||||
|
41
modules/services/chrony/default.nix
Normal file
41
modules/services/chrony/default.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.modules.services.chrony;
|
||||||
|
in {
|
||||||
|
options.modules.services.chrony = {
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Enable chrony NTP deamon";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.chrony = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
servers = [
|
||||||
|
"uk.pool.ntp.org"
|
||||||
|
"time.cloudflare.com"
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
makestep 1.0 3
|
||||||
|
|
||||||
|
bindaddress 0.0.0.0
|
||||||
|
port 123
|
||||||
|
allow
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.timesyncd.enable = mkForce false;
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedUDPPorts = [ 123 ];
|
||||||
|
allowedTCPPorts = [ 123 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user