Synchronize hosts/containers/grafana

This commit is contained in:
Ehmry - 2019-12-03 15:20:17 +01:00 committed by Astro
parent 5810750141
commit ca44a44ede
1 changed files with 44 additions and 39 deletions

View File

@ -2,6 +2,7 @@
{
imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix>
../../../lib
../../../lib/lxc-container.nix
../../../lib/shared.nix
@ -15,21 +16,27 @@
hq.interface = "eth0";
};
services.openssh.enable = true;
boot.isContainer = true;
# /sbin/init
boot.loader.initScript.enable = true;
boot.loader.grub.enable = false;
networking.hostName = "grafana";
networking.useNetworkd = true;
# Needs IPv4 for obtaining certs?
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
services.resolved.enable = false;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
];
# Create a few files early before packing tarball for Proxmox
# architecture/OS detection.
system.extraSystemBuilderCmds = ''
mkdir -m 0755 -p $out/bin
ln -s ${pkgs.bash}/bin/bash $out/bin/sh
mkdir -m 0755 -p $out/sbin
ln -s ../init $out/sbin/init
'';
# http https
networking.firewall.allowedTCPPorts = [ 80 443 ];
# http https influxdb
networking.firewall.allowedTCPPorts = [ 80 443 8086 ];
# collectd
networking.firewall.allowedUDPPorts = [ 25826 ];
@ -49,8 +56,7 @@
};
users.allowSignUp = true;
};
services.influxdb =
let
services.influxdb = let
collectdTypes = pkgs.stdenv.mkDerivation {
name = "collectd-types";
src = ./.;
@ -82,4 +88,3 @@
# should.
system.stateVersion = "18.09"; # Did you read the comment?
}