nixos/magi: Add basic NTP configuration

This commit is contained in:
Mikael 2024-11-12 20:58:46 +01:00
parent b997a7a9ed
commit e73d473488
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0
4 changed files with 42 additions and 0 deletions

View file

@ -1,3 +1,9 @@
{ self, ... }: { lib, config, pkgs, ... }: { { self, ... }: { lib, config, pkgs, ... }: {
imports = with self.nixosModules; [ magi ]; imports = with self.nixosModules; [ magi ];
services.ntpd-rs.settings.source = map (address: {
mode = "server";
inherit address;
}) [ "casper.nyantec.com" "melchior.nyantec.com" ]
|> lib.mkAfter;
} }

View file

@ -9,4 +9,10 @@
fsType = "vfat"; fsType = "vfat";
}; };
}; };
services.ntpd-rs.settings.source = map (address: {
mode = "server";
inherit address;
}) [ "melchior.nyantec.com" "balthasar.nyantec.com" ]
|> lib.mkAfter;
} }

View file

@ -1,3 +1,9 @@
{ self, ... }: { lib, config, pkgs, ... }: { { self, ... }: { lib, config, pkgs, ... }: {
imports = with self.nixosModules; [ magi ]; imports = with self.nixosModules; [ magi ];
services.ntpd-rs.settings.source = map (address: {
mode = "server";
inherit address;
}) [ "casper.nyantec.com" "balthasar.nyantec.com" ]
|> lib.mkAfter;
} }

View file

@ -132,4 +132,28 @@
]; ];
}; };
}; };
services.ntpd-rs = {
enable = true;
settings = {
source = map (n: {
mode = "server";
address = "ptbtime${toString n}.ptb.de";
}) (lib.range 1 4) ++ [
{
mode = "server";
address = "alucard.nyantec.com";
}
];
server = [
{
listen = "[::]:123";
}
{
listen = "0.0.0.0:123";
}
];
};
};
} }