feat(nasp): add ntpd; telegraf ok

This commit is contained in:
2024-06-14 17:55:59 +08:00
parent 82da5eb829
commit a5e85c6cd8
2 changed files with 42 additions and 2 deletions

View File

@@ -248,7 +248,7 @@ in
## mkdir -p ~/.config/sops/age
## nix-shell -p ssh-to-age --run "ssh-to-age -private-key -i /etc/ssh/ssh_host_ed25519_key > ~/.config/sops/age/keys.txt"
(lib.mkIf sopsCfg.enable {
sops.defaultSopsFile = ../${mainCfg.hostName}/secrets.yaml;
sops.defaultSopsFile = ../${config.networking.hostName}/secrets.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
})
# telegraf
@@ -267,7 +267,7 @@ in
flush_interval = "30s";
flush_jitter = "3s";
precision = "0s";
hostname = assert (mainCfg.netName != ""); mainCfg.netName;
hostname = assert (config.networking.hostName != ""); config.networking.hostName;
omit_hostname = false;
};
outputs.influxdb_v2 = {
@@ -291,6 +291,10 @@ in
fieldpass = [ "used" "total" "bucket"];
interval = "30s";
};
inputs.temp = {
name_override = "temperture";
tags = { bucket = "device"; };
};
};
};
})
@@ -392,6 +396,10 @@ in
tags = { bucket = "device"; };
};
};
services.ntp = {
enable = true;
servers = [ "192.168.16.118" ];
};
}))
]);
}