1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00

nixos/routnerr-2: enable wireguard_exporter

This commit is contained in:
Matt Layher 2020-04-30 18:42:04 -04:00
parent 6fdca2b235
commit c446d6cce5
2 changed files with 26 additions and 1 deletions

View file

@ -33,9 +33,18 @@ in {
./wgipamd.nix
# Out-of-tree modules.
./lib/modules/wireguard_exporter.nix
./lib/modules/wgipamd.nix
];
# Overlays for out-of-tree packages.
nixpkgs.overlays = [
(self: super: {
wireguard_exporter =
super.callPackage ./lib/pkgs/wireguard_exporter.nix { };
})
];
# Use the GRUB 2 boot loader with MBR.
boot = {
kernel = {
@ -71,8 +80,9 @@ in {
cbfstool
flashrom
# Unstable packages.
# Unstable and out-of-tree packages.
unstable.corerad
wireguard_exporter
];
# Use server as a remote builder.

View file

@ -106,4 +106,19 @@ in {
nat.enable = false;
firewall.enable = false;
};
# Enable Prometheus exporter and set up peer key/name mappings.
# TODO: nixify the configuration.
services.wireguard_exporter = {
enable = true;
config = ''
[[peer]]
public_key = "VWRsPtbdGtcNyaQ+cFAZfZnYL05uj+XINQS6yQY5gQ8="
name = "mdlayher-fastly"
[[peer]]
public_key = "UvwWyMQ1ckLEG82Qdooyr0UzJhqOlzzcx90DXuwMTDA="
name = "nerr-3"
'';
};
}