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 = [ imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix>
../../../lib ../../../lib
../../../lib/lxc-container.nix ../../../lib/lxc-container.nix
../../../lib/shared.nix ../../../lib/shared.nix
@ -15,21 +16,27 @@
hq.interface = "eth0"; 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.hostName = "grafana";
networking.useNetworkd = true; 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: # Create a few files early before packing tarball for Proxmox
# $ nix search wget # architecture/OS detection.
environment.systemPackages = with pkgs; [ system.extraSystemBuilderCmds = ''
vim 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 # http https influxdb
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 8086 ];
# collectd # collectd
networking.firewall.allowedUDPPorts = [ 25826 ]; networking.firewall.allowedUDPPorts = [ 25826 ];
@ -49,8 +56,7 @@
}; };
users.allowSignUp = true; users.allowSignUp = true;
}; };
services.influxdb = services.influxdb = let
let
collectdTypes = pkgs.stdenv.mkDerivation { collectdTypes = pkgs.stdenv.mkDerivation {
name = "collectd-types"; name = "collectd-types";
src = ./.; src = ./.;
@ -82,4 +88,3 @@
# should. # should.
system.stateVersion = "18.09"; # Did you read the comment? system.stateVersion = "18.09"; # Did you read the comment?
} }