Commit graph

36 commits

Author SHA1 Message Date
rnhmjoj 1d61efb7f1 treewide: use attrs instead of list for types.loaOf options 2020-01-06 10:39:18 -05:00
Silvan Mosberger 478e7184f8
nixos/modules: Remove all usages of types.string
And replace them with a more appropriate type

Also fix up some minor module problems along the way
2019-08-31 18:19:00 +02:00
Daniel Schaefer 92cccb6f83 treewide: Use HTTPS for readthedocs URLs 2019-04-22 20:46:18 +02:00
Ben Kelly ace4855cf6 nixos/munin: enable munin_update and disable munin_stats
munin_update relies on a stats file that exists, but isn't found in the
default location on NixOS; the appropriate plugin configuration is
added.

munin_stats relies on munin-cron writing a logfile, which the NixOS
build of munin does not. (This is probably fixable in the munin package,
but I don't have time to dig into that right now.)
2019-02-04 20:17:26 -05:00
Ben Kelly e7c1449ae9 nixos/munin: add types to Munin options
Some options were missing their types.
2019-02-04 20:17:26 -05:00
Ben Kelly c4437fee7e nixos/munin: add extraCSS option
This permits custom styling of the generated HTML without needing to
build your own Munin package from source. Also comes with an example
that works as a passable dark theme for Munin.
2019-02-04 20:17:26 -05:00
Ben Kelly 6c907851f4 nixos/munin: add extraPlugins and extraAutoPlugins options [#17895]
extraAutoPlugins lets you list plugins and plugin directories to be
autoconfigured, and extraPlugins lets you enable plugins on a one-by-one
basis. This can be used to enable plugins from contrib (although you'll
need to download and check out contrib yourself, then point these
options at it), or plugins you've written yourself.
2019-02-04 20:17:26 -05:00
Ben Kelly b5b82b2cae nixos/munin: require DejaVu fonts if enabled
munin-graph is hardcoded to use DejaVu Mono for the graph legends; if it
can't find it, there's no guarantee it finds a monospaced font at all,
and if it can't find a monospaced font the legends come out badly
misformatted.
2019-02-04 20:17:26 -05:00
Ben Kelly 0c3208a8e4 nixos/munin: add disabledPlugins option
This is just a set of globs to remove from the active plugins directory
after autoconfiguration is complete.

I also removed the hard-coded disabling of "diskstats", since it seems
to work just fine now.
2019-02-04 20:17:26 -05:00
Ben Kelly c74abf763a nixos/munin: add extraPluginConfig option
This lets you specify additional plugin-specific configuration to go in
plugin-conf.d, and complements the extraConfig and extraGlobalConfig
options.
2019-02-04 20:17:26 -05:00
Ben Kelly c02564e37c nixos/munin: fix documentation links
Since this module was written, Munin has moved their documentation from
munin-monitoring.org/wiki to guide.munin-monitoring.org. Most of the
links were broken, and the ones that weren't went to "please use the new
site" pages.
2019-02-04 20:17:26 -05:00
Florian Jacob c54aa26a2d nixos/munin: move from /var/run to /run
as using /var/run now emits a warning by systemd's tmpfiles.d.
As /var/run is already a symlink to /run, this can't break anything, and
data does not need to be migrated.
2018-10-03 17:36:37 +02:00
Florian Klink fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Kjetil Orbekk bd3e49a80e nixos/munin: fix broken plugin wrappers
The munin-node service used wrapProgram to inject environment variables.
This doesn't work because munin plugins depend on argv[0], which is
overwritten when the executable is a script with a shebang line (example
below).

This commit removes the wrappers and instead passes the required
environment variables to munin-node.

Eliminating the wrappers resulted in some broken plugins, e.g., meminfo
and hddtemp_smartctl. That was fixed with the per-plugin configuration.

Example:

  The plugin if_eth0 is a symlink to /.../plugins/if_, which uses $0
  to determine that it should monitor traffic on the eth0 interface.

  if_ is a wrapped program, and runs `exec -a "$0" .if_-wrapped`

  .if_-wrapped has a "#!/nix/.../bash" line, which results in bash
  changing $0, and as a result the plugin thinks my interface
  is called "-wrapped".
2017-11-25 11:23:56 +01:00
Florian Jacob 43f94ff5a9 nixos/munin: move munin-cron to systemd.tmpfiles
to match with munin-node.
2017-10-21 11:27:42 +01:00
Florian Jacob 3338985aab nixos/munin: Create MUNIN_PLUGSTATE dir to fix munin_stats plugin 2017-10-21 11:27:42 +01:00
Jean-Pierre PRUNARET e6157451c1 nixos/munin: scripts need to be executable in order to build a wrapper
"Builder called die: Cannot wrap
/nix/store/XXX-munin-available-plugins/plugin.sh because it is not an
executable file"

[Bjørn: Keep DRY, quote "$file".]
2017-08-14 07:50:32 +02:00
Bjørn Forsman c282de7103 nixos/munin: remove duplicated /run/current-system/sw/bin path
A side effect of commit ff21171921
("Fix references to current-system/sw/sbin"). It changed "sbin" to "bin"
but didn't check for duplicates.
2017-04-30 21:04:51 +02:00
Jörg Thalheim b4169bb8dd
munin: fix tests by replacing cron with systemd timer 2017-03-22 00:16:36 +01:00
florianjacob c23c2c50de munin service: listen on IPv6 loopback as well (#23012)
munin service: listen on IPv6 loopback as well
2017-02-20 06:13:48 +01:00
Parnell Springmeyer 4aa0923009
Getting rid of the var indirection and using a bin path instead 2017-01-29 04:11:01 -06:00
Parnell Springmeyer e92b8402b0
Addressing PR feedback 2017-01-28 20:48:03 -08:00
Parnell Springmeyer bae00e8aa8
setcap-wrapper: Merging with upstream master and resolving conflicts 2017-01-25 11:08:05 -08:00
Emery Hemingway b675619391 nixos: use types.lines for extraConfig 2016-10-23 19:41:43 +02:00
Parnell Springmeyer 98c058a1ee Adapting everything for the merged permissions wrappers work. 2016-09-01 19:21:06 -05:00
Thomas Strobel a04a7272aa Add missing 'type', 'defaultText' and 'literalExample' in module definitions
- add missing types in module definitions
- add missing 'defaultText' in module definitions
- wrap example with 'literalExample' where necessary in module definitions
2016-01-17 19:41:23 +01:00
William A. Kennington III ff21171921 Fix references to current-system/sw/sbin 2015-04-01 13:57:36 -07:00
Bjørn Forsman 0a8623d6a9 nixos/munin: add /var/setuid-wrappers to PATH
/var/setuid-wrappers is an extension of the system profile, so it
belongs in PATH for the munin service.
2014-12-25 15:43:51 +01:00
Eelco Dolstra 59edfd61ad Increase systemd timeout on Jenkins and Munin tests
These were timing out a lot.

http://hydra.nixos.org/build/13991108
http://hydra.nixos.org/build/13991107
2014-09-05 15:50:55 +02:00
Bjørn Forsman 0a750e0f39 nixos/munin: change activationScript to preStart script
All activation scripts run in serial upon boot and nixos-rebuild switch
etc., in contrast to preStart which run before a service starts, and can
run in parallel with other services.

The munin(-node) activation script is particularly slow. Change it to a
preStart script so that it can run in parallel with other services and
not slow down boot (or nixos-rebuild switch).

This reduces (repeated) "nixos-rebuild test" time from ~16 seconds to ~8
on my (old) laptop.
2014-07-26 00:31:34 +02:00
Eelco Dolstra 29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Bjørn Forsman db12d783ff nixos: add uid/gid for munin
To be compatible with eb2f44c18c (Generate
/etc/passwd and /etc/group at build time). Without this you'll get this:

  $ nixos-rebuild build
  [...]
  user-thrown exception: The option `users.extraGroups.unnamed-9.1.gid' is used but not defined.
2014-02-07 23:08:15 +01:00
Bjørn Forsman dc352536a8 nixos: capitalize a bunch of service descriptions
(systemd service descriptions that is, not service descriptions in "man
configuration.nix".)

Capitalizing each word in the description seems to be the accepted
standard.

Also shorten these descriptions:
 * "Munin node, the agent process" => "Munin Node"
 * "Planet Venus, an awesome ‘river of news’ feed reader" => "Planet Venus Feed Reader"
2013-11-09 20:45:50 +01:00
Domen Kožar 03e1178f80 munin: fix documentation links 2013-10-23 13:54:46 +02:00
Domen Kožar aeff0028bf munin: add test and fix a bug 2013-10-20 21:16:24 +02:00
Domen Kožar 9230ae6522 munin: refactor package and add nixos service 2013-10-20 15:08:07 +02:00