0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge branch 'master.upstream' into staging.upstream

This commit is contained in:
William A. Kennington III 2015-07-01 13:38:17 -07:00
commit 7eae48871f
83 changed files with 894 additions and 219 deletions

View file

@ -224,6 +224,7 @@
tvheadend = 200;
uwsgi = 201;
gitit = 202;
riemanntools = 203;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@ -426,6 +427,7 @@
#tvheadend = 200; #unused
uwsgi = 201;
gitit = 202;
riemanntools = 203;
# When adding a gid, make sure it doesn't match an existing
# uid. Users and groups with the same name should have equal

View file

@ -234,6 +234,7 @@
./services/monitoring/nagios.nix
./services/monitoring/riemann.nix
./services/monitoring/riemann-dash.nix
./services/monitoring/riemann-tools.nix
./services/monitoring/scollector.nix
./services/monitoring/smartd.nix
./services/monitoring/statsd.nix

View file

@ -154,7 +154,7 @@ in
config = mkIf config.services.postgresql.enable {
services.postgresql.authentication =
services.postgresql.authentication = mkAfter
''
# Generated file; do not edit!
local all all ident ${optionalString pre84 "sameuser"}

View file

@ -0,0 +1,62 @@
{ config, pkgs, lib, ... }:
with pkgs;
with lib;
let
cfg = config.services.riemann-tools;
riemannHost = "${cfg.riemannHost}";
healthLauncher = writeScriptBin "riemann-health" ''
#!/bin/sh
exec ${pkgs.riemann-tools}/bin/riemann-health --host ${riemannHost}
'';
in {
options = {
services.riemann-tools = {
enableHealth = mkOption {
type = types.bool;
default = false;
description = ''
Enable the riemann-health daemon.
'';
};
riemannHost = mkOption {
type = types.str;
default = "127.0.0.1";
description = ''
Address of the host riemann node. Defaults to localhost.
'';
};
};
};
config = mkIf cfg.enableHealth {
users.extraGroups.riemanntools.gid = config.ids.gids.riemanntools;
users.extraUsers.riemanntools = {
description = "riemann-tools daemon user";
uid = config.ids.uids.riemanntools;
group = "riemanntools";
};
systemd.services.riemann-health = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "riemanntools";
ExecStart = "${healthLauncher}/bin/riemann-health";
PermissionsStartOnly = true;
};
};
};
}