nixos/magi: Add basic NTP configuration
This commit is contained in:
parent
b997a7a9ed
commit
e73d473488
4 changed files with 42 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
{ self, ... }: { lib, config, pkgs, ... }: {
|
||||
imports = with self.nixosModules; [ magi ];
|
||||
|
||||
services.ntpd-rs.settings.source = map (address: {
|
||||
mode = "server";
|
||||
inherit address;
|
||||
}) [ "casper.nyantec.com" "melchior.nyantec.com" ]
|
||||
|> lib.mkAfter;
|
||||
}
|
||||
|
|
|
@ -9,4 +9,10 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
services.ntpd-rs.settings.source = map (address: {
|
||||
mode = "server";
|
||||
inherit address;
|
||||
}) [ "melchior.nyantec.com" "balthasar.nyantec.com" ]
|
||||
|> lib.mkAfter;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
{ self, ... }: { lib, config, pkgs, ... }: {
|
||||
imports = with self.nixosModules; [ magi ];
|
||||
|
||||
services.ntpd-rs.settings.source = map (address: {
|
||||
mode = "server";
|
||||
inherit address;
|
||||
}) [ "casper.nyantec.com" "balthasar.nyantec.com" ]
|
||||
|> lib.mkAfter;
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue