nix #11
|
@ -1,7 +0,0 @@
|
|||
server 0.europe.pool.ntp.org offline
|
||||
server 1.europe.pool.ntp.org offline
|
||||
server 2.europe.pool.ntp.org offline
|
||||
server 3.europe.pool.ntp.org offline
|
||||
driftfile /etc/chrony.drift
|
||||
rtconutc
|
||||
rtcsync
|
|
@ -1,5 +0,0 @@
|
|||
if $if_up; then
|
||||
chronyc online
|
||||
elif $if_down; then
|
||||
chronyc offline
|
||||
fi
|
|
@ -79,43 +79,6 @@
|
|||
|
||||
### STOPPED HERE ###
|
||||
|
||||
# Time synchronisation
|
||||
|
||||
- name: Mask systemd-timesyncd
|
||||
systemd:
|
||||
name: systemd-timesyncd
|
||||
state: stopped
|
||||
enabled: no
|
||||
masked: yes
|
||||
become: yes
|
||||
notify: etc changed
|
||||
|
||||
- name: Configure chrony
|
||||
copy:
|
||||
src: chrony.conf
|
||||
dest: /etc/chrony.conf
|
||||
become: yes
|
||||
notify:
|
||||
- etc changed
|
||||
- chrony reconfigured
|
||||
# TODO More configuration, RTC configuration
|
||||
|
||||
- name: Enable chronyd
|
||||
systemd:
|
||||
name: chronyd
|
||||
enabled: yes
|
||||
become: yes
|
||||
notify:
|
||||
- etc changed
|
||||
- chrony reconfigured
|
||||
|
||||
- name: Configure dhcpcd chrony hook
|
||||
copy:
|
||||
src: dhcpcd.exit-hook
|
||||
dest: /etc/dhcpcd.exit-hook
|
||||
become: yes
|
||||
notify: etc changed
|
||||
|
||||
- name: Empty motd
|
||||
copy:
|
||||
content: ""
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
@ -142,7 +142,14 @@
|
|||
# Enable the OpenSSH daemon
|
||||
openssh.enable = true;
|
||||
getty.autologinUser = "geoffrey"; # DEBUG
|
||||
chrony.enable = true;
|
||||
|
||||
# Time sychronisation
|
||||
chrony = {
|
||||
enable = true;
|
||||
servers = map (n: "${toString n}.europe.pool.ntp.org") (lib.lists.range 0 3);
|
||||
extraConfig = "rtcsync";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# TEST
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
interfaces = ["eth0"];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ wirelesstools ];
|
||||
services.chrony.serverOption = "offline";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue